MCUxpresso doesn't generate struct variables for peripherals

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

MCUxpresso doesn't generate struct variables for peripherals

Jump to solution
3,540 Views
muratdemirtas
Contributor I

 

Hello, i'm using config tools for nxp mcu mkm33z64a to generate generic peripherals such as PIT, UART, etc.. 

 

I have faced an issue that mcuxpresso doesn't generate some of the peripheral config variables for following peripherals (SIM, UART, PIT).

For example, mcuxpresso config tools doesnt create a variables for baudrate but initialization header show that "baudRate_Bps: '115200'"

/***********************************************************************************************************************
* RS485UART initialization code
**********************************************************************************************************************/
/* clang-format off */
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
instance:
- name: 'RS485UART'
- type: 'uart'
- mode: 'interrupts'
- custom_name_enabled: 'true'
- type_id: 'uart_9b45c456566d03f79ecfe90751c10bb4'
- functional_group: 'BOARD_InitPeripherals'
- peripheral: 'UART1'
- config_sets:
- uartConfig_t:
- uartConfig:
- clockSource: 'BusInterfaceClock'
- clockSourceFreq: 'GetFreq'
- baudRate_Bps: '115200'
- parityMode: 'kUART_ParityDisabled'
- dataBitsCount: 'kUART_EightDataBits'
- enableMatchAddress1: 'false'
- matchAddress1: '0'
- enableMatchAddress2: 'false'
- matchAddress2: '0'
- txFifoWatermark: '0'
- rxFifoWatermark: '1'
- idleType: 'kUART_IdleTypeStartBit'
- enableTx: 'true'
- enableRx: 'true'
- interruptsCfg:
- interrupts: 'kUART_TxDataRegEmptyInterruptEnable kUART_TransmissionCompleteInterruptEnable kUART_RxDataRegFullInterruptEnable kUART_RxOverrunInterruptEnable'
- interrupt_vectors:
- enable_rx_tx_irq: 'true'
- interrupt_rx_tx:
- IRQn: 'UART0_UART1_IRQn'
- enable_interrrupt: 'enabled'
- enable_priority: 'false'
- priority: '0'
- enable_custom_name: 'true'
- handler_custom_name: 'RS485UART_RX_TX_IRQHANDLER'
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
/* clang-format on */
const uart_config_t RS485UART_config = {
,
,
,
,
.parityMode = kUART_ParityDisabled,
,
,
.idleType = kUART_IdleTypeStartBit,
.enableTx = true,
.enableRx = true
};

 

as you can see the variables are not generated.

.baudRate_Bps = 19200,
.txFifoWatermark = 0,
.rxFifoWatermark = 1

 

 

Another example which generated code for a RTC module, when i created a default time for test purpose using mcuxpresso config tool then generated code doesnt not have any time struct.

 

/***********************************************************************************************************************
* RTC initialization code
**********************************************************************************************************************/
/* clang-format off */
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
instance:
- name: 'RTC'
- type: 'irtc'
- mode: 'general'
- custom_name_enabled: 'false'
- type_id: 'irtc_bbc7c0541dea6ecbc2805a02e8ddd930'
- functional_group: 'BOARD_InitPeripherals'
- peripheral: 'RTC'
- config_sets:
- general:
- clockSource: 'src1'
- clockSourceFreq: 'BOARD_BootClockRUN'
- clockOutSelection: 'kIRTC_ClkoutNo'
- irtc_config:
- irtc_config_t_var: []
- wakeupSelect: 'wakeup'
- timerStdMask: 'ungated'
- alrmMatch: 'kRTC_MatchSecMinHr'
- lock: 'false'
- enableDaylightTime: 'false'
- daylight_time:
- startMonth: '1'
- endMonth: '1'
- startDay: '1'
- endDay: '1'
- startHour: '0'
- endHour: '0'
- daylight_struct_var: []
- tamper_config: []
- irtc_datetime:
- 0:
- uid: '1669725402832'
- struct_id: 'Time0'
- description: ''
- constantStruct: 'true'
- irtc_datetime_t:
- year: '1984'
- month: '1'
- day: '1'
- week_day: '0'
- hour: '0'
- minute: '0'
- second: '0'
- disable_id: '1669719067734'
- setDateTime: '1669719067734'
- setAlarm: '1669719067734'
- interrupt_requests: 'kIRTC_1hzInterruptEnable'
- enable_interrupt: 'true'
- interrupt_vector:
- IRQn: 'RTC_IRQn'
- enable_interrrupt: 'enabled'
- enable_priority: 'false'
- priority: '0'
- enable_custom_name: 'false'
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
/* clang-format on */
const irtc_config_t RTC_config = {
,
,

};
const irtc_datetime_t RTC_Time0 = {
,
,
,
,
,
,

};

I'm using latest version MCUexpresso config tools and Kinetis MCU SDK's which downloaded from mcu expresso sdk builder online tool. My toolchain is created for IAR Embedded Workbench.

Is this a bug? Is there any workaround for this? 

Thanks.

0 Kudos
1 Solution
3,110 Views
Petr_H
NXP Employee
NXP Employee

Thank you. We have finally been able to reproduce the problem. It relates to the behavior of one function with the Turkish locale. 

There should work as a workaround to launch the tools with enforced english locale behavior with the following steps:

- Right-click on the "MCUXpresso Config Tools v12.1.lnk" and select properties

- Add the parameter -nl en_US to the tools.exe, as shown on the following picture:

Petr_H_1-1672673528568.png

Please let me know if the workaround works for you. 

best regards

Petr Hradsky

 

View solution in original post

0 Kudos
16 Replies
3,490 Views
RaRo
NXP TechSupport
NXP TechSupport

Hello @muratdemirtas,

Have you tried to configure the same modules in a new project in MCUXpresso's ConfigTools?

Trying out a new project may help us to find out if the problem is related with the MCUXpresso's ConfigTools, or a thing related with the toolchain being created with IAR Embedded Workbench and the usage of it in MCUXpresso's ConfigTools.

Could you please tell us which versions of MCUXpresso and MKM33Z64A's SDK are you using?

An update may come in handy if you are using older versions of them. The newest version for the MCUXpresso is the 11.6.1 and the SDK's newest version is the v2.12.

Regards, Raul.

0 Kudos
3,483 Views
muratdemirtas
Contributor I

Hello again Raul,

        for double confirmation, i have created a new project using only mcu expresso config tool without entering sdk path. I have enabled RTC clock and just set the default time to current time but as you can see there is no data for RTC_Time0. The code was not generated at this step, i'm leaving code preview tool screenshot below.

muratdemirtas_0-1670441102370.png

 

 

 

muratdemirtas_0-1670440855591.png

 

0 Kudos
3,476 Views
RaRo
NXP TechSupport
NXP TechSupport

Hello @muratdemirtas,

Please help me with the next questions:

  • After modifying the RTC, do you see a change in color (highlight) in the Code Preview window?
  • What OS are you using?

Meanwhile, please try out the following recommendations for solving your problem:

  1. Enter ConfigTools in the toolbar, click on Views -> Reset Views. If this doesn't solve it, click on Help -> Check for Updates.

RaulRomero_0-1670450814384.png

  1. Reinstall the ConfigTools.
  2. Try it out with the MCUXpresso IDE. You can download it here: MCUXpresso IDE for NXP MCUs | Linux, Windows and iOS | NXP Semiconductors. There you can access the ConfigTools too.

Regards, Raul.

0 Kudos
3,468 Views
muratdemirtas
Contributor I

 

  • After modifying the RTC, do you see a change in color (highlight) in the Code Preview window?

I can see the modified values highlight's on the code preview but this occurs on generated struct variables. Other struct values couldnt generated from config tool(this is the error). I'm attaching the screenshot.

This error occurs on every peripheral on MCU when using config tool.

For talking about SLCD display mode, i'm changing lcd display mode then highlight shown but other values such as slcd clock config doesnt created by config tool.

highlighted

 

muratdemirtas_0-1670511832103.png

Not highligted, struct variable not generated

 

muratdemirtas_1-1670512105051.png

 

  • What OS are you using?

I'm using latest Microsoft Windows 11 x64.

 

  1. Enter ConfigTools in the toolbar, click on Views -> Reset Views. If this doesn't solve it, click on Help -> Check for Updates.

Reset views is not solved this issue. Check for updates returns that 

muratdemirtas_2-1670512249437.png

 

  1. Reinstall the ConfigTools.

I reinstalled Config tools twice for confirmation before but no luck.

 

  1. Try it out with the MCUXpresso IDE. You can download it here: MCUXpresso IDE for NXP MCUs | Linux, Windows and iOS | NXP Semiconductors. There you can access the ConfigTools too.

We cannot use MCUXpresso ide. Because our code is based on IAR compiler.

Thanks for help.

 

 

 

 

 

 

0 Kudos
3,457 Views
RaRo
NXP TechSupport
NXP TechSupport

Hello again @muratdemirtas,

Thanks for your answers.

There are some observations that are worth to mention.

First: Looking in Release Notes for the MCUXpresso Config Tools, in System Requirements, says it recommend the use of the following Host Operating systems:

RaulRomero_0-1670532972524.png

The MCUXpresso Config Tools should work for your version, nonetheless, we cannot assure you that, because it was not tested for Windows 11.

If you have the opportunity, could you please try the MCUXpresso Config Tools with Windows 10 on another computer?

Second: Have you tried use the MCUXpresso Config Tools with another microcontroller? Maybe would be useful if you try with the MKM33Z64A, as you mention it at the very beginning of this thread.

Best regards, Raul.

0 Kudos
3,450 Views
muratdemirtas
Contributor I

Hello Raul,

First: Looking in Release Notes for the MCUXpresso Config Tools, in System Requirements, says it recommend the use of the following Host Operating systems:           

 

I have tested this issue both win11 and win10 so, there is a same error exists on both side.

 

muratdemirtas_0-1670570154400.png

Second: Have you tried use the MCUXpresso Config Tools with another microcontroller? Maybe would be useful if you try with the MKM33Z64A, as you mention it at the very beginning of this thread.

Both two microcontroller mkm33z64a and mkm34z256 are has the same issue for config tool code generation. I'll wait them until new config tool version released. 

Thanks for your answers.

 

 

0 Kudos
3,486 Views
muratdemirtas
Contributor I

Hello Raul,

            Thanks for your feedback. Yes i have tried with new project and different mcu's but still same.. I'm attaching to screenshots but i'm currently using different mcu mkm34. I have the same error when code was generated. 

 

muratdemirtas_0-1670440050876.png

 

 

muratdemirtas_1-1670440087941.png

 

muratdemirtas_0-1670440220083.png

 

 

0 Kudos
3,429 Views
Petr_H
NXP Employee
NXP Employee

Hi,

Could you please share with us the .mex file with the configuration you are using? If you can provide it, please ensure you save it on the disk first (using File > Save menu command).

Regards

Petr Hradsky

MCUXpresso Config Tools Team

0 Kudos
3,420 Views
muratdemirtas
Contributor I

Hi peter, 

      i'm attaching as attachment this .mex file which you wanted, thanks.

0 Kudos
3,332 Views
Petr_H
NXP Employee
NXP Employee

Hi, 

unfortunately we haven't been able to reproduce the problem yet. 

We will continue the analysis, but it may take more time. There is one thing you could additionally try meanwhile - clean the config tools data cache. To do that, use the following steps:

1) Invoke Data Manager by selecting File > Data manager

2) Select 'Clean Cached' button and confirm the dialog.

3) Restart the config tools and try to open the configuration again.

Please let us know if there is any improvement.

Regards

Petr Hradsky

Config Tools Team

0 Kudos
3,329 Views
muratdemirtas
Contributor I

Hello Peter,

         I followed your instruction and cleaned all caches using data manager, after restarted config tool, this error continues again. I'm trying to define default time RTC for example, struct variables are empty again but, the comment line shows correct values, i'm attaching screenshot.

 

muratdemirtas_1-1671546456308.png

 

0 Kudos
3,305 Views
Petr_H
NXP Employee
NXP Employee

It seems that the issue may be related to your international locale setup. But it will need some more investigation.

Could you please provide us the config tools log file that should be located on this path: c:\Users\{user name}\.nxp\swtools.log ? And also the file c:\Users\{user name}\.nxp\nxp_conf_workspace_v12.0\log_0.txt 

We are sorry, but it will probably take more time to check as our team is out of office until the end of the year. 

Regards

Petr Hradsky

Config Tools Team

0 Kudos
3,303 Views
muratdemirtas
Contributor I

Hello Again Peter,

            I'm attaching to requested file as attachments, thank you.

0 Kudos
3,111 Views
Petr_H
NXP Employee
NXP Employee

Thank you. We have finally been able to reproduce the problem. It relates to the behavior of one function with the Turkish locale. 

There should work as a workaround to launch the tools with enforced english locale behavior with the following steps:

- Right-click on the "MCUXpresso Config Tools v12.1.lnk" and select properties

- Add the parameter -nl en_US to the tools.exe, as shown on the following picture:

Petr_H_1-1672673528568.png

Please let me know if the workaround works for you. 

best regards

Petr Hradsky

 

0 Kudos
3,104 Views
muratdemirtas
Contributor I

Hello Peter,

      Thanks for your workaround. This helped me and fixed all problems. Have a good day!.

muratdemirtas_0-1672676359711.png

 

Tags (1)
0 Kudos
3,063 Views
Petr_H
NXP Employee
NXP Employee

I'm glad to hear that it works properly now. The issue will be fixed in the next release.

best regards

Petr Hradsky

Config Tools Team

0 Kudos