Yep! We hope to see the same for FEZ Hydra.
@ Pablo,
ARM_Vectors is some array, of 84 or 86 entries, of unknown type. If i remember correctly then the code just says:
extern ARM_Vectors[84];
Probably just an array of int32 at a fixed ram location, to map the int_vectors. Will look more tomorrow.
@ Architect,
I was using the latest compiler, but switched to the one Gus recommended when I had the linking problems, just to exclude compiler issues… Once everything compiles I will switch to the new compiler and try again…
@ Gus,
Isn’t there a port for the Hydra yet?
@ Errol: That table is defined in startup code. Each compiler uses a predefined name for each interrupt and if you use one you must use that naming convention.
At least that is the way it works on each plattform that ST support on its examples. Unfortunate there is no template on raw GCC usage, but some of the IDEs ST support are GCC based and thats why I told you to look at that IDE becuase its GCC based.
Of course that is only the definition, and somehow it must be used by .NETMF and dont know where to look for it.
I think we need to start with some port that works on GCC and then port it to stm32f4.
By the way thank you for your great effor and time you take to help the comunity.
@ Pablo,
This is from the Porting Guide from Mircosoft:
@ Architect,
Are you keeping RVDS compatibility? Also, with the new compiler something about va_list changed. This requires a core source change in tinycrt.cpp. This will break compatibility with the old compiler…
@ Architect,
How did you edit the assembly files? The ARM_Vectors thing is exported from FirstEntry.s
I created a dummy ARM_Vercors to see if I can get it to link, but it complains:
[quote]TinyHal_Cortex.lib(FirstEntry.obj): In function PreStackInit_Exit_Pointer': (i.EntryPoint+0x28): relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
BootEntry’ defined in .text.BootEntry section in system_initialization_hal.lib(tinyhal.obj)[/quote]
Which might be the reason for not finding ARM_Vectors in the first place…
Found ARM_Vectors. It was an ASM translation mistake. Forgot to export the address…
Relocation error was a linker script error. It was placing the destination for the jump too far away, and the code does a short jump, which didn’t reach. Changed linker to place the BootEntry closer to the start and now it compiles and links! ;D
bin folder totals 300KB… Probably a third bigger than with RVDS, but with 1MB chips available this will not be a problem…
Now I just need to extend the ASM stubs that I created earlier… Yay…
This looks like fun!
Check out these links if you are not already awaire:
Yes, the discovery board costs less than the chip alone, at least here in the UK! It is such good value I bought one just in case it is a mistake!
Thanks for the doc. Will look through it.
Porting to CortexM4 isn’t required, but would be nice. that would speed up math etc…
Yes. I am doing it the way the rest of the PK is structured. For STM32 I have added RVD_S and GNU_S for asm files. Moved Oberon implementation to RVD_S and porting same .s files using GCC asm syntax in the GNU_S folder. Modified proj file to indicate that .s files are in the subdirs:
<ItemGroup>
<Compile Include="[b]$(AS_SUBDIR)[/b]\FirstEntry.s" />
<Compile Include="[b]$(AS_SUBDIR)[/b]\IDelayLoop.s" />
<Compile Include="$[b](AS_SUBDIR)[/b]\VectorsHandlers.s" />
</ItemGroup>
Alright, spent some time yesterday on STM32Stamp. No compiler errors anymore. Working onscatterfile_tinyclr_gcc.xml. There is no gcc scatter file, so reading about the schema and how it is done for gcc.
Do you mean that you need the files, or the values in the files?
I have hacked and slashed at another project’s files and got a set up that links. I have not had the time to modify the addresses in the linker files though.
I can post my files when I get home, must place it on my website as I can’t post a zip file here…
How did you translate the ISR stuff in client_v4_2_comm\DeviceCode\Targets\Native\STM32\DeviceCode\CortexM3\GlobalLock\SmartPtr_cortex.cpp??
It compiles, but only because everything is ifdef-ed out for GCC…
I got stuch on that file. It uses:
__cpp(offsetof(SmartPtr_IRQ, m_state))
that I could not find a substitute for…
Check this article:
Ok, done with the scatter file. Having some linker issues now. For some reason it can’t find device specific lib files. I see the libs in the output lib folder and I also see --library-path command line option pointing to the right location, but for some reason it can’t find the files.
Yay, my MF port reaches address 0x64 before going into a loop and never recovering. Now the actual porting starts. The bootstrap code isn’t setting the oscillator up correctly and the code waits in an infinite loop for the oscillator to be ready…
Good job! I am not there yet.
@ Errol
Did you solve this problem?
Yeah, that was my mistake.
I couldn’t find a build log file, so I would copy the offending command and execute it on the command line to get the actual error message.
Running the linker command from the command line requires that you change to the build output directory.
If you get an error in the line of “LargeBuffer.lib’ can’t be found” then it is because you are not in the build folder and you are trying to run the link command by hand.
If you are getting an error about stdio.lib or something like that then you have an error in your tool xml file. That one took me two days to find…
On another note:
I have replaced the header file of the stm32f10x with the header of the stm32f4xx and,yay, they did not keep register names the same. Also, the GPIO config works differently on the F4…
Most files adapted. GPIO needed a lot of TLC. Still don’t know if I have the resistors Pull up/down correct.
Only one file left. USB. That will need crap loads of TLC…
I have messed up my scatter file. Taking a break now.
Come on! Don’t take a break now…
Anyone know how to add more debug info into the axf file?
Anyone know what debug tool I can use with the axf file for the SMT32?
[quote]Come on! Don’t take a break now…[/quote] ;D
Alright, can I take a look at your scatter file?
Sorry, I can’t help here,