Mf4.2 + gcc +stm32

Hi guys, if Tinybooter.axf is not created though all code compiles, what could be the cause?
I cant really see which step is supposed to create it looking at the output.

Broken scatter file maybe?

Tinybooter isnt included in the application, not for Cerberus anyway. The NETMF boots directly.

We are regularly getting questions that was already answered on the wiki GHI Electronics – Where Hardware Meets Software

Found it
Target Name="BuildAXF in ***.gcc.targets was missing an entry for GCC4.6.1

Now I happily see my scatter file is badly broken
C:\CodeBench201109\bin\arm-none-eabi-ld.exe: region LR_FLASH' overflowed by 9108 bytes C:\CodeBench201109\arm-none-eabi\lib\thumb2\libc.a(lib_a-sbrkr.o): In function_sbrk_r’:
:slight_smile:

@ Errol

could you compile and run Cerb OK code from GCC?

@ maoli,
I finally got it to compile with GCC yesterday, but it crashes with a hard fault. Same as my previous porting attempt. I have not had a chance to investigate further though…

Hi

we are currently adding “NativeSample” project to STM32 build that should be better starting point for GCC investigation… well we hope of course the YES SUCCESS comes soon… it seems several developers are close…

Antti

What sort of size difference are you seeing between the RVDS-compiled version and the GCC-compiled version? Is GCC 4.6 any better than the ancient 4.2 version in this regard?

I have not done an indepth compare. Will look tonight, comparing RVDS and GCC4.6. I have modified my codeset and I don’t think it will still complie with GCC4.2

I don’t think there’s much value in putting effort into getting 4.2 to compile it. It’s now nearly 5 years old. Specific support for the Cortex-M4 didn’t show up until 4.6.

The RVDS dfu file from GHI is 266KB. The DFU file that I created with GCC and the DFU tool is 316KB. I can’t say that my DFU file is correct though.

That seems acceptable. Assuming your file is correct (I’m willing to assume that :D), there should be plenty of flash on this monster to reasonably build with GCC.

@ Gus
I have a question about the GHI port.
You allow 88 bytes for the Custom Heap. The interrupt Vectors are placed there, but the vectors are 84 longs, so that is 220 bytes. Do you just discard the upper interrupt vectors?

I have no idea. I am the one always here on forum but not the one with magic skills behind the scene :slight_smile:

That could be a bug but I think custom heap was not used for vectors. The are copied on power up to beginning if ram IIRC

This is from the map file after compilation. I don’t know if I did something wrong. Can someone post this from tinyclr.map when compiled with RVDS?

[quote]ER_CUSTOM_HEAP_BEGIN
0x1000ff70 0x154
*(SectionForCustomHeapBegin)
SectionForCustomHeapBegin
0x1000ff70 0x154 TinyHal_Cortex.lib(FirstEntry.obj)
0x1000ff70 ARM_Vectors
0x100100c0 CustomHeapBegin[/quote]
This is located in CCM ram, which ends at 0x1000FFFF. In the scatter file it is set up to end at 0x1000FF8, but as the required space is 0x154 it overruns the allocated space…

Tried to build with MDK

got PWM_SCALE_FACTOR is undefined.

Coudn’t find it anywhere in the files

Doesn’t MDK use the ARM compiler, the same one used in RVDS?

Yes

You are still using 4.2 RTM, you need to upgrade to QFE1…

Is it safe to install it on top of the RTM?

Edit: nevermind