Project - Cerberus NETMF 4.2 patch for GCC

Cerberus NETMF 4.2 patch for GCC

This is the minimal change set to build the cerb family firmware with GCC 4.6.
The compilation process is the same as for NETMF 4.3 here http://www.tinyclr.com/codeshare/entry/618 and on the forum discussion about it.
Some more information on the Wiki : GHI Electronics – Where Hardware Meets Software

6 Likes

Thank you!

@ NicolasG - That is excellent. Thank you!!!

@ Gus, I think it would be really great if we could get this merged into the codeplex source. That way the community does not have to jump through additional hoops to get the Cerberus family firmware building with GCC and GCC bits will remain current as the code base evolves.

4 Likes

I strongly +1 Chris on merging GCC support for Cerb builds into Codeplex.

@ patc - That sounds like the 4.3 TinyCLR.proj file was inadvertently added. If you revert to the 4.2 TinyCLR.proj file it should work.

That is the proj file at the following location

Solutions\FEZCerberus\TinyCLR\TinyCLR.proj

@ patc - Are you using the 4.2 or 4.3 porting kit? I checked the repository and I see that 4.2 has lwip\lwip_1_3_2 while 4.3 has lwip\lwip. I did not check the actual 4.3 porting kit, I just checked the 4.3 code base which is similar.

Does this build the non-ethernet or the ethernet version for Cerberus?

Just follow the instructions here in the following post to convert Cerberus from non Ethernet to the Ethernet firmware: http://www.tinyclr.com/forum/topic?id=10282&page=1#msg102201

It is the same for Hydra as well.

Ahhh. Thank you!

Anyone else getting an issue where ToString(“F2”) on a double is not formatting, is something being stubbed out from corlib, FormatNative perhaps, seems to do it on the 4.3 build as well.

The issue seems to be related to hal_snprintf_double in DeviceCode\pal\tinycrt\tinycrt.cpp

theres a special case for GCC that ignores the formatting string completely with the comment

// GCC vsnprintf corrupts memory with floating point values 

removing all that code and putting in the non gcc code makes it non bootable.

@ Aron - It is not exactly the same as for hydra, the scatterfile for cerberus doesn’t have “RELOC_RAM”, and memory constraints aren’t the same.

Someone got a scatterfile working for gcc 4.6.2 and ethernet activated ?

with the standard scatterfile provided by the patch I got :

C:\GCC_4_6_3\bin…\arm-none-eabi\bin\ld.exe: C:\MicroFrameworkPK_v4_2\BuildOutput\THUMB2\GCC4.6\le\FLASH\release\FEZCerberus\bin\tinyclr.axf section .bss' will not fit in regionRAM’
C:\GCC_4_6_3\bin…\arm-none-eabi\bin\ld.exe: region `RAM’ overflowed by 12708 bytes

@ Fradav

What I was referring to what was the same on Hydra was only the project file to activate the Ethernet firmware vs. Non Ethernet firmware. Yes, you are correct that the memory constraints are indeed different on the Cerberus vs Hydra.