I spent the weekend until now to compile the DirectC for Smartfusion. In the beginning I thought I could compile it to be executed from the RAM, but the binary was too big for the RAM (the RAM can hold 64kb, but the binary was 76kb big). Thus I had to compile it for the Flash and relying that we will be able to flash it using openocd (and also that this will work). In parallel to this, the stdlib also had to be compiled with the DirectC, since it depends on many functions of the stdlib, like memset. In the beginning, the code was compiled with the option -nostdlib, which was fine while we didn’t have to use stdlib. Now we needed that, thus I removed the option, which would try to link crt0.o instead of the startup code provided by Actel (which we where using since the beginning). The solution was to add the -nostdlib option again and link explicitly the stdlib. Now it compiles ok.
Possibly related posts: