ChaNFSUSB Compiler Problem

18 Aug 2011

Hey guys,

I have to face the following problem.

About one month ago I wrote my program with previous online compiler. I use the ChaNFSUSB lib therein. Build was successful!

Now I wanted to update the code, so I opened the project (new online compiler) and compiled without changes to make sure everything is ok with the original project. I was quite surprised to get the following error message:

" Unable to automatically place AT section usbhost_lpc17xx.c.c.LPC1768.o(.ARM.AT_0x2007C000) with required base address 0x2007c000. Please manually place in the scatter file using the no_autoat option." in file "/"

Now I wonder what to do and where to add the "no_autoat" option?

Best wishes

18 Aug 2011

Hi guys,

the error seems to be caused by the following expression in the usbhost_lpc17xx.c file:

/media/uploads/mr_q/expression.txt

Hope someone can help here!

Best wishes

25 Aug 2011

Hi guys,

problem fixed! The following changes need to be done in the usbhost_lpc17xx.c file to get the ChaNFSUSB lib compiled again:

/media/uploads/mr_q/expression_changes.txt

Best wishes

15 Apr 2014

First of all, thank you very much for sharing your solution Richard; although it didn't work for me, it put me in the right path. I know that this is an old topic, but I had the same problem with the "- -no_autoat" option and MSCFileSystem + MSCUsbHost in my project. I solved it as follows: In file usbhost_lpc17xx.cpp I replaced the lines:

// USB host structures
// AHB SRAM block 1
#define HOSTBASEADDR 0x2007C000
// reserve memory for the linker
static USB_INT08U HostBuf[0x200] __attribute__((at(HOSTBASEADDR)));

with

// USB host structures
// AHB SRAM block 1
// reserve memory for the linker
static volatile __align(0x200) USB_INT08U HostBuf[0x200] __attribute((section("AHBSRAM1"),aligned));

I took the idea from file "USBHALHost.cpp" of this program:

Import programUSBHostMSD_HelloWorld

USNHostMSD Hello World