value set/get on non-aligned address
it's not 100% bug but got me stucked two days...
there are such macro definitions in lx_api.h: ... #define LX_UTILITY_SHORT_SET(address, value) ((USHORT)(address)) = (USHORT)(value) #define LX_UTILITY_LONG_SET(address, value) ((ULONG)(address)) = (ULONG)(value) #define LX_UTILITY_SHORT_GET(address) (((USHORT)(address))) #define LX_UTILITY_LONG_GET(address) (((ULONG)(address)))
in case address is not 4 bytes aligned on LONG_GET/SET, neither 2 bytes aligned on SHORT_GET/SET, you will get wrong value on many platforms such as the ARM platform.
for the universality, we should use SET/GET just as what fx_utility***_read/write did to replace these macros.
btw:
-
although there are '16' in _fx_utility_16_unsigned_write/read, it's confused that UINT type but not USHORT parameters are used.
-
the default nand defition is 128MB in lx_nand_flash_simulator.c, however, it's a simulated nand based on RAM, and I guess most systems running LX has less than 128MB RAM, so it's not a friendly settings to the newbies.
Hi @jie-ss. Thank you for raising this issue. We will discuss it during our weekly meeting later today.
@eclipse-threadx/iot-threadx-committers and @eclipse-threadx/iot-threadx-contributors: Please provide feedback.