New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISCO_F746NG: add usp_speed configuration #5580

Merged
merged 2 commits into from Nov 30, 2017

Conversation

Projects
None yet
3 participants
@bcostm
Contributor

bcostm commented Nov 24, 2017

Description

Add a new usb_speed configuration in targets.json in order to select between the FS or HS USB connectors present on the board.

Status

READY

Migrations

NO

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 24, 2017

One note, as this is global scope macro, using short names like this might clash with libraries. I would rather skip the macro name set in the config and use the full name that config would do MBED_CONF_TARGET_USP_SPEED would be by default? What is the reason for defining macro USB_SPEED and not using default generated name?

@bcostm

This comment has been minimized.

Contributor

bcostm commented Nov 24, 2017

OK no problem it will be better but I don't know how to do it ? I wanted to do the same as CLOCK_SOURCE configuration...

When I build the target, the automatically generated mbed_config.h file contains:

// Configuration parameters
#define MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR 0                            // set by library:platform
#define MBED_CONF_PLATFORM_STDIO_BAUD_RATE          9600                         // set by library:platform
#define CLOCK_SOURCE                                USE_PLL_HSE_XTAL|USE_PLL_HSI // set by target:DISCO_F746NG
#define MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES   0                            // set by library:platform
#define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600                         // set by library:platform
#define MBED_CONF_PLATFORM_STDIO_FLUSH_AT_EXIT      1                            // set by library:platform
#define USB_SPEED                                   1                            // set by target:DISCO_F746NG

How do I generate the MBED_CONF_TARGET_USB_SPEED macro ?

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 24, 2017

If you remove macro_name from the config, that would do the trick.

@bcostm

This comment has been minimized.

Contributor

bcostm commented Nov 24, 2017

OK.

I have removed the line "macro_name": "USB_SPEED" in targets.json and the mbed_config.h file contains effectively the desired macro:

#define MBED_CONF_TARGET_USB_SPEED 1 // set by target:DISCO_F746NG

@bcostm bcostm force-pushed the bcostm:dev_usb_speed_disco-f746ng branch to b1073c1 Nov 24, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 27, 2017

@bcostm Thanks, looks good now

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Nov 27, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 27, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Nov 27, 2017

Build : SUCCESS

Build number : 600
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5580/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 merged commit 221b8a8 into ARMmbed:master Nov 30, 2017

6 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bcostm bcostm deleted the bcostm:dev_usb_speed_disco-f746ng branch Dec 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment