SDK 2.8.0 MK81/MK82 Build Warning with MCUXpresso 11.7.1

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

SDK 2.8.0 MK81/MK82 Build Warning with MCUXpresso 11.7.1

1,149 Views
deniscollis
Contributor V

In MCUXpresso I 'Create a new C/C++ project..", and select only the MCU 'MK81FN256xxx' (no 'board' is associated with it).

deniscollis_0-1690824469775.png

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.

deniscollis_1-1690825391091.png

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.

 

0 Kudos
Reply
4 Replies

1,041 Views
deniscollis
Contributor V

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

   

1,083 Views
deniscollis
Contributor V

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

 

0 Kudos
Reply

1,071 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

1,109 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply