Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Broken MDK build of MCBSTM32F400 solution due to endian macros #501

Closed
cw2 opened this issue Aug 24, 2016 · 1 comment
Closed

Broken MDK build of MCBSTM32F400 solution due to endian macros #501

cw2 opened this issue Aug 24, 2016 · 1 comment
Labels

Comments

@cw2
Copy link
Contributor

cw2 commented Aug 24, 2016

The changes to endian macros merged in PR #484 have missed a few files that result in a broken MDK build of MCBSTM32F400 solution.

DeviceCode\pal\OpenSSL\OpenSSL_1_0_0\tinyclr\ssl_types.h
DeviceCode\Targets\OS\CMSIS_RTOS\DeviceCode\lwip_1_4_1_os\arch\cc.h
DeviceCode\Targets\OS\Win32\lwip_1_4_1_os\arch\cc.h

In the first case, the symbol LITTLE_ENDIAN is not defined, which causes wrong #if/#else branch being used (the other endianness), in the second and third case BYTE_ORDER symbol is defined as [a non-existent] LITTLE_ENDIAN

#define BYTE_ORDER LITTLE_ENDIAN

but later compared to NETMF_TARGET_LITTLE_ENDIAN

#if (LWIP_PLATFORM_BYTESWAP == 0) && (BYTE_ORDER == NETMF_TARGET_LITTLE_ENDIAN)
...

which is false, so the swapping functions (lwip_htons etc.) are skipped and missing from linker (error : L6218E: Undefined symbol lwip_htons).

If I understand it correctly and the fix is to simply use NETMF_TARGET_LITTLE_ENDIAN in all those three files (?), I have a PR ready...

@cw2
Copy link
Contributor Author

cw2 commented Aug 24, 2016

Edit: Scratch this, found the numeric values for #define-s...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants