SDK examples without Mex configuration?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDK examples without Mex configuration?

Jump to solution
1,048 Views
Anonymous
Deactivated User

Hello, please somebody help me understand this new MCUXpresso environment. According to NXP documentation the SDK package provides the examples which demonstrate all the development framework. I suppose to choose to import the example from SDK and I get a project which can be used as a template for the user's project.

But almost all the examples (except the application demos)  I looked at do not have neither Mex nor xml configuration file. So how can I use the examples to follow recommended workflow ? Opening for the first time the configuration tool from within the example project shows none of those components selected which are actually the essence of the given example.

Let's take usb_device_composite_cdc_msc_disk example project. After importing the project and opening configuration tool I have USB device not even selected so the device configuration complexity I have to start from scratch. Surely my "from scratch" made generated project initialization will kill the working example code.

Am I missing something important in terms of how to use the example projects? May be it is possible to generate a correctly working mex configuration from existing project code?

Please somebody advise

Vlad

0 Kudos
1 Solution
1,010 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

The pin configure tool and the clock configure tool can read a description segment in pin_mux.c and clock_config.c when the tools is enabled for the project. The segment looks like

/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitPins:
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
- pin_list:
  - {pin_num: L14, peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_13, software_input_on: Disable, hysteresis_enable: Disable, pull_up_down_config: Pull_Down_100K_Ohm,
    pull_keeper_select: Keeper, pull_keeper_enable: Enable, open_drain: Disable, speed: MHZ_100, drive_strength: R0_6, slew_rate: Slow}
*/

Tool take it as project default setting. After that, these two files become read-only.

There isn't such a structure in peripheral driver. Peripheral configure tools will always start in default state. So, if you start from a example project, for example the usb_dev_cdc_vcom_bm, you can use the tool to add other peripherals configuration. But you can't add a new configuration for USB.

 

Regards,

Jing

 

View solution in original post

0 Kudos
4 Replies
1,023 Views
Anonymous
Deactivated User

Jing, please clarify what do you mean by "they will not conflict".
If adding configuration without generating C files, then what's the purpose of configuration?  If I do generate C files, then the configuration tool always overrides existing C files (the tool does not allow user's manual merge ).

So if I don't guess correctly configuration of a peripheral, then new configuration will break down current project and I cannot make use of it...
If the user would not make a mistake knowing exactly what configuration was meant to be when example was coded, that user knows how to use the peripheral so he would not need the example at all... if user makes mistake in configuration , the code will be broken telling the user "your configuration guess is wrong"... so what is the intended use of examples without a configuration file?

0 Kudos
1,011 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

The pin configure tool and the clock configure tool can read a description segment in pin_mux.c and clock_config.c when the tools is enabled for the project. The segment looks like

/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitPins:
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
- pin_list:
  - {pin_num: L14, peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_13, software_input_on: Disable, hysteresis_enable: Disable, pull_up_down_config: Pull_Down_100K_Ohm,
    pull_keeper_select: Keeper, pull_keeper_enable: Enable, open_drain: Disable, speed: MHZ_100, drive_strength: R0_6, slew_rate: Slow}
*/

Tool take it as project default setting. After that, these two files become read-only.

There isn't such a structure in peripheral driver. Peripheral configure tools will always start in default state. So, if you start from a example project, for example the usb_dev_cdc_vcom_bm, you can use the tool to add other peripherals configuration. But you can't add a new configuration for USB.

 

Regards,

Jing

 

0 Kudos
1,003 Views
Anonymous
Deactivated User

Thank you Jing,

how do you enable the configuration tool for the project? Just by starting the config tools from withing MCUXpresso project? Aren't the project always enabled for (re)configuration?

The ability to see the configuration of the peripheral in an example code and customizing it  is of paramount importance. I'd say it is the main reason for having examples and having config tools...

Especially such complex peripheral as USB : having visual example of it's configuration is as important as having a working code to use it.  Forcing the developers to choose either to use the example code or you are on your own if you want to start with configuration using the config tools , - is not smart choice...

Anyway thank you for your reply, it seems to be as complete as it can be in this less than perfect situation with examples.

Sincerely

Vlad

Tags (1)
0 Kudos
1,038 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi ebirdman,

Yes, all of the example projects are not created by configuration tool. So, the configuration tool can't pick up peripheral settings from these project.

But you can add configuration settings to example project. They will not conflict.

 

Regards,

Jing

0 Kudos