portSAVE_CONTEXT SAM7S64

Hi I try to make this work. I that the lwip demo and remove all the emac + usb + lwip thing. I have change the board.h and all include file to use the sam7s64 one. Now I have the same problem as other. I don’t exit from the first call of portSAVE_CONTEXT macro in portmacro.h. I have change the ld file to accomodate the memory size of the 64s board. Ddoes any one here that have been able to get a demo working with freertos +  at92sam7s64 + gcc ? Dumarjo

portSAVE_CONTEXT SAM7S64

Which startup file did you use (could probably use the same as per the lwIP demo on the sam7x)? Are you calling main() from Supervisor mode? Did you setup the stacks as per the sam7x demo?

portSAVE_CONTEXT SAM7S64

I use the complete example but just strip down the lwip + usb + emac stuff. Dumarjo

portSAVE_CONTEXT SAM7S64

Have you taken out the idle hook function?  This will cause a crash if the usb task is not running as it tries to send data on the usb as part of the demo.

portSAVE_CONTEXT SAM7S64

I have remove the content of it. but still there. it’s verry strange. I have found un complete package from this forum from scott miller. I try it and dosen’t work more. I never get back from the restor context. I light up a led in the begining of the macro and another on after it and the second one don’t light up. with this demo, now my board is resetting. i really don’t know what to do with this now !!! Dumarjo

portSAVE_CONTEXT SAM7S64

try sending your files to richard to look at

portSAVE_CONTEXT SAM7S64

this is what i have done. Thanks for your help. Dumarjo

portSAVE_CONTEXT SAM7S64

if i understood well, you are using the linker scripts from the lwip demo with an AT91SAM7S64. my guess is this will not work. the reason is: the SAM7X, for which the ld script was made, has lots more ram and flash. thus, a couple things will be set at addresses that don’t really exist on your SAM7S64 (actually, there might be an address overlap to lower addresses) so the point is: you have to use a ld script for sam7s64 with the right ram and rom sizes set

portSAVE_CONTEXT SAM7S64

It seems you are not configuring the processor flash or clocks. Take a look at the boot.s file included with the lwIP demo.  You will see that it calls a function AT91F_LowLevelInit().  I have added this to the files you sent me and now everything you sent is working. Regards.