FreeRTOS_Plus_TCP_and_FAT_Zynq_SDK data abort in release mode.

wzengerle wrote on Tuesday, June 19, 2018:

Hi Again. I’m using a MicroZed board, I have my own HW and BSP projects - I’ve got the FTP server from the FreeRTOS_Plus_TCP_and_FAT_Zynq_SDK up and going in debug mode. The issue I’m having seems to be from the FAT subsytem if I try and change it over to release mode. It’s OK as long as I only use the ram disk, but if I have an SDCard inserted, soon after I start the program (using the debugger) it traps to a data abort from inside FF_Mount(); I think it’s from the memcpy after the /* FAT32 */ comment, but it could be in one of the preceding lines (some time after 1422, since I’m in release mode, it has clearly been reordered somewhat). The SD card is in fact formatted fat32, and it’s a single 8GB partition. It works in debug mode, I’ve transferred files to and from. Release mode optimization -O2 with -g for debug info. I even tried defining SIMPLE_MEMCPY 1 to no advantage (which makes me think it is either not the memcpy or that memcpy isn’t actually being linked). The data abort status register is 0x00000001 (data alignment) but the data abort status register is 0 so not too much help there. [ I’ve had a lot of issues with gcc and cortex-a9 embedded and alignment data faults ]