I'n my DMA definition I've set the source address to:
Address definition type 'Start address'
Start address expression '&uartLogData'
External definition 'struct {} uartLogData'
With tools version 10 this worked fine, as the 'extern struct {} uartLogData' declaration was placed inside the peripherals.c file, so the DMA driver could resolve the correct address.
Tools version 11 however places this declaration inside the peripherals.h file, where it then generates a conflict with the actually definition:
controlFlow.c:
#include "peripherals.h"
struct uartLogData {
<some fields>
} uartLogData;
../source/controlFlow.c:61:3: error: conflicting types for 'uartLogData'
61 | } uartLogData;
| ^~~~~~~~~~~
In file included from ../source/controlFlow.c:10:
<root>/board/peripherals.h:158:18: note: previous declaration of 'uartLogData' was here
158 | extern struct {} uartLogData;
| ^~~~~~~~~~~
Why has this changed for the newer tools? And how should I work with this new situation?
Thanks in advance.
Kind regards,
Remco Poelstra
Solved! Go to Solution.
Hi,
I've found a solution:
If I define the source address in the peripheral configurator as:
struct uartLogData uartLogData
Then I can define in the final .c file:
struct uartLogData {
<fields>
} uartLogData;
This allows a concise definition in the peripheral configurator and an `external` definition placed in the peripherals.h file.
Kind regards,
Remco Poelstra
Hi,
I've found a solution:
If I define the source address in the peripheral configurator as:
struct uartLogData uartLogData
Then I can define in the final .c file:
struct uartLogData {
<fields>
} uartLogData;
This allows a concise definition in the peripheral configurator and an `external` definition placed in the peripherals.h file.
Kind regards,
Remco Poelstra
Hi,
Do you have an update on this problem? I can't get my code to compile anymore with this change in the config tool.
Hi,
Thanks for your reply.
I've a custom board with an LPC844. I'm running on bare metal, with just the SDK.
MCUXpresso is 11.5.0 and SDK is ksdk2_0. The 'Installed SDKs' view is empty, so I can't get the version info from there.
The tool I'm describing is the one that generates the code when pressing 'Update Code' after double-clicking the .mex file.
I've added the diff that gets generated when I run 'Update Code' with no actuall changes to the .mex file. You can see the version number of the 'tool' is increased as well as that the (address) definitions are moved from the .c to the .h file.
Kind regards,
Remco Poelstra
Hello r_poelstra
If you could share me the .mex and the configurations you set in the config tool did you do, please.
Regards
Pavel_Hernandez
Hello r_poelstra
But first, could you give me more information about your setup. What's board or uC do you have? In case be a custom, what MCU are you using ?
Your application is running in BR o RTOS?
What's version of SDK and MCUxpresso you are using?
What kind of tool are you describing?
Please, May you show me the right steps for replay this case?
Regards
Pavel_Hernandez