In MCUXpresso I 'Create a new C/C++ project..", and select only the MCU 'MK81FN256xxx' (no 'board' is associated with it).
When I build, I get a compiler warning: "conversion from 'unsigned int' to 'uint8_t' {aka 'unsigned char'} changes value from '1074548736' to '0' [-Woverflow]"
I see the debug console initialization:
DbgConsole_Init(BOARD_DEBUG_UART_BASEADDR, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq);
However, the function is expecting:
status_t DbgConsole_Init(uint8_t instance, uint32_t baudRate, serial_port_type_t device, uint32_t clkSrcFreq);
In addition, if I disable the debug console, auto breakpoint is not there, and the application does not run.
----
Now, if I 'Create a new C/C++ project..", and select the frdmk82f board, the project compiles without any warnings.
Note that the exact same SDK Version 2.8.0 (366 2020-07-21) is used for both projects. The debug console initialization in the second project now matches the expected arguments:
DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq);
It appears the the SDK builder is using some deprecated, mismatched sources. I note that in the first case, above, board.h:
/* The board name */
#define BOARD_NAME "TWR-K81F150M"
Clearly, the fix needs to come from the MCUXpresso SDK team.
Hi Pavel,
The simplest solution is to always create new projects using the FRDM-K82F board, and then to edit your board files to match your custom board.
If your project does not require K81 features, then your K82 project will run without modification.
If your project requires K81 features, then source the startup/ and device/ folders, and only those additional K81-specific drivers (e.g. dryice) from a second, separate K81 project.
Thanks
Denis
Hi Pavel.
I cannot trust the SDK. IMHO I think it's an issue, rather than a warning. Luckily I know the workaround, but it took me months of a frustratingly unstable debugging before I realized what was going on.
Thanks
Hello, I apologize for that inconvenience, if you want to share to the community your solution to future users, feel free to share it, and thanks for your contribution.
Best regards,
Pavel
Hello, my name is Pavel, and I will be supporting your case, unfortunately, this "warning" does not represent an issue to do a new release.
Best regards,
Pavel