I tested unaligned access with the code above in u-boot, when I ran the code, I got
Start Aligned Test
u8_t * access test[1]:0 #CPU halt here
CCCCCCCC
test is defined as global array u8_t test[1000] = {0};
I am using SDK ti-processor-sdk-lnux-am335x-evm-01.00.00.03
and I try to add -munaligned-access -fno-conserve-stack to KBUILD_CFAGS in the root Makefile of uboot, but it seems not work.
I also update the u-boot/arch/arm/cpu/armv7/config.mk -mno-unaligned-accss to -munaligned-access, it seems not work neither.
What's the problem?