When storing an opaque pointer value in a uint, the
appropriate type is uintptr_t which is guaranteed to
be wide enough to hold a pointer.
This is particularly important when the code can be
compiled in a sim or unit test environment which is
intended to run on a 64-bit machine.
Conflicts:
flight/PiOS/Common/pios_flash_jedec.c
flight/targets/DiscoveryF4/System/pios_board.c
flight/targets/FlyingF4/System/pios_board.c
flight/targets/Freedom/System/pios_board.c
flight/targets/Quanton/System/pios_board.c
When storing an opaque pointer value in a uint, the
appropriate type is uintptr_t which is guaranteed to
be wide enough to hold a pointer.
This is particularly important when the code can be
compiled in a sim or unit test environment which is
intended to run on a 64-bit machine.
Conflicts:
flight/targets/DiscoveryF4/System/pios_board.c
flight/targets/FlyingF4/System/pios_board.c
flight/targets/Freedom/System/pios_board.c
flight/targets/Quanton/System/pios_board.c
Build it with:
make ut_logfs
Create a raw flash file like this:
dd if=/dev/zero bs=1 count=2MiB | tr '\000' '\377' > theflash.bin
Run it with:
./build/unit_tests/logfs/logfs.elf && echo 'all good'
Conflicts:
Makefile