I’ll be heading home in the next few mins(it’s 18h00) will try to upload it when I get home.
Found a way to add more debug info.
You are supposed to do a Debug build, instead of a Release.
But that adds 143 new errors to the code. So I just added the -g parameter to GCC for the release build…
That makes sense 
How big is the debug build compared to release?
I have not had time to sort through that… 
The binary image with the -g parameter stays the same size, this it just adds info to the axf file used for debugging…
Edit:
The scatter files:
http://www.errolsworld.com/TinyCLR.zip
Just look at the ram scatter files. Can’t remember if I ever looked at them. Don’t know if they are correct… 
Looks like my issue is different, since it didn’t fix it. Looks like it is my port of FirstEntry.s. It sucks that assembly files are not compatible between compilers.
By the way for the scatter files, I think you don’t need …_ram_functions.xml files for GCC they are conditional for other compilers.
What does it say? Is it a linker issue?
I remember that I had a “jump is too long” or something like that, that was related to my scatter file and the firstentry.s file…
Are you guys working on STM32F4? It is slightly different from STM32F1, mainly changes in register base addresses.
@ Gus I want to get F1 working (i have ST32Stamp) and then F4 on Discovery board.
@ Errol linker errors:
[quote] TinyHal_Cortex.lib(FirstEntry.obj): In function EntryPoint': (i.EntryPoint+0x0): relocation truncated to fit: R_ARM_ABS8 againsti.EntryP
oint’
TinyHal_Cortex.lib(FirstEntry.obj): In function PreStackInit_Exit_Pointer': (i.EntryPoint+0x25): relocation truncated to fit: R_ARM_ABS8 against symbol
BootEntry’ defined in .text.BootEntry section in system_initialization_hal.li
b(tinyhal.obj)
TinyHal_Cortex.lib(FirstEntry.obj): In function Fault_Handler': (i.EntryPoint+0x30): relocation truncated to fit: R_ARM_ABS8 againsti.Entry
Point’
[/quote]
@ Gus,
I’m targeting the F4. And there are more changes than that. GPIO was enhanced A LOT. So nothing matches up. USB has had a major rework, adding USB On The Go and Host. The clock was changed. More busses was added and peripherals moved to ther other busses.
@ Archtect,
How much flash does your F1 device have? If it onlt has 256KB then that would be your problem. Else it might be something with the region definitions in the ASM files.
I have not had time to play again, but I need to get the code into a debugger. I stepped the ASM and saw that it gets to a POP statement, which throws and exception which takes the CPU to a fail-safe forever loop. But I get past FirstEntry. Seems to die in BootstrapCodeMinimal. At the end of BootstrapCodeMinimal it POPs the stack and dies…
It is 512. Actually it is exactly same board that this port was made for. By the way what setup/environment do you use for embedded development and debugging?
I know that this port was for that board, but this port, for that board, was also made for MDK or KEIL. So I figured that they might have been able to fit it into a 256K chip with fancy compilers… 
At home I use MPLAB from Microchip, for my PIC development. At work I use IAR for MSP430. Neither of which will for for this. There is Atollic TrueSTUDIO for STM32. Played with that a bit, but couldn’t import the axf file, and can’t load the srource as it uses the msbuild tool, not a makefile…
Ok, who can explain the memory model to me?
I finally got GDB running and connected. Seems that my code s crassing on PrepareImageRegions, or more exactly Prepare_Copy. This apparently copys from values from flash to ram. The segment being copied is RAM_RO. It is being copied from the Config part of flash(the last 8KB of flash) to address 0x00000000 which is still mapped to flash, if i’m not mistaken. It copies 508 bytes. But this seems to corrupt the stack which causes the CPU to crash…
Any ideas?
Sorry not much help from me on that one.I will be getting back to ST32 this weekend.
How do you like getting Cerberus?
Thanks for the heads up. Didn’t see that thread… ;D
You will have to post info when you get it, if you are allowed to. 
Mine will take two weeks to arrive, so you will get yours WAY before me… 
You are welcome!
I figured (not seeing your reply there) 
Actually not
Private email will explain the plan.
Funnily enough I expected something like that… ;D
Ok, I need help from the experts… 
My port has the following startup code:
Start:
@ allow per processor pre-stack initialization
PreStackEntry:
b PreStackInit
PreStackInit_Exit_Pointer:
ldr r0,=StackTop
mov r0,sp
bl BootstrapCode
.ifdef HAL_REDUCESIZE
b BootEntryLoader
.else
b BootEntry
.endif
@ ALIGN 4
StackTop_Ptr:
.word StackTop
Fault_Handler:
b Fault_Handler
.end
Bootstap goes fine. BootEntryLoader goes fine, but returns, then the branch to Fault_Handler executes. What is supposed to happen? Is there supposed to be some fixed values placed in the stack during stack init?
Edit: Scratch that. It never gets to BootEntry. When it tries to return from BootStrapCode it dies…