My reset issue was in part related to the odd naming for the fuses. I inadvertently enabled the hardware watchdog to start with the chip.
With that disabled my program always dies in the same spot. Seems to be malloc related. The first time malloc is called, deep inside, it dies, in side _sbrk_r() to be exact.
The gateway did not receive a timely response from the upstream server or application.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 Server at www.tinyclr.com Port 80[/quote]
Ok, that issue was because I switched compilers and didn’t delete the build folder. This meant that old and new object files where being linked. Really bad.
Next issue…
Dying in Events_WaitForEvents. As in the ST gdb server dies. Dead. Seems that the interrupts are not enabled and the CPU sleeps indefinitely…
Getting further though.
Edit: Also, my “STM32_Flash_Driver::EraseBlock” code nukes the whole flash…
Great. Flash isn’t arranged in a friendly manner on this chip.
First four sectors are 16KB each. Then one 64KB sector, then 7 sectors of 128KB.
What is BLOCKTYPE_STORAGE_A and BLOCKTYPE_STORAGE_B used for?
I need two sectors of 4KB, one for each of BLOCKTYPE_STORAGE_A and BLOCKTYPE_STORAGE_A.
Then I need one sector of 8KB for BLOCKTYPE_CONFIG.
For the old file / new file problem it may help to run
msbuild /t:clean /p:flavor=flash;release=debug
This will clean out the output folder
I would have liked to hear the words you uttered when you saw the flash get nuked Glad that you found out about the jagged sector sizing.
AFAIK BLOCKTYPE_STORAGE_A / B are used as 2 banks for EWR. At this point you can live without them. Remove them from the BlockStorage header and the scatter file.
Interestingly enough, with GCC at least, and probably the others, it’s possible to do everything in C, with no asm at all (not even for the vector table). To see how this can be done, see this YAGARTO sample project: http://www.yagarto.de/download/yagarto/STM32Test.zip
Started moving the Cerberus code over to GCC. Having a new issue with the IP stack, don’t think that was part of my previous porting attempt.
Getting this:
[quote]D:\MF\client_v4_2_comm\DeviceCode\pal\lwip\SocketsDriver\lwIP__Sockets.cpp: In static member function ‘static int LWIP_SOCKETS_Driver::GetNativeError(int)’:
D:\MF\client_v4_2_comm\DeviceCode\pal\lwip\SocketsDriver\lwIP__Sockets.cpp:1075:9: error: duplicate case value
D:\MF\client_v4_2_comm\DeviceCode\pal\lwip\SocketsDriver\lwIP__Sockets.cpp:998:9: error: previously used here[/quote]
But they are different #defines with different defined values.
Line 1075
case ESHUTDOWN:
Line 998
case ENOTSOCK:
Defined in D:\MF\client_v4_2_comm\DeviceCode\pal\lwip\lwip_1_3_2\src\include\lwip\arch.h
#define ENOTSOCK 88 /* Socket operation on non-socket */
#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
Don’t know if the compiler is the issue though. Will try older compiler tonight. I just changed the #define for one from 108 to 1108 and it compiled.
The only real compiler issue I have had was with tinycrt.c, I think. There was some varg mangling or something that I just removed as GCC now complies to the standard and it doesn’t need mangling anymore…
I’m trying this out too, as Architect, I want to get the STMF1 port working first. Imanaged to get Sourcery CGG 4.6.1 working and most code compiles.
The assembler code is causing me headache though.
What is the correct GCC syntax for these here:
VectorsHandlers.s:38: Error: invalid register list to push/pop instruction – push {r0-r11}' VectorsHandlers.s:57: Error: invalid register list to push/pop instruction --push {r0-r12,r14}'
IDelayLoop.s:18: Error: instruction not supported in Thumb16 mode – `subs r0,r0,#4’
Besides these I still have to convert SmartPtr_cortex asm…
PS: @ Architect: did the move to a newer GCC fix those duplicate “BX lr” errors?