@Brett It is probably the flash / ram mapping…I wasn’t sure what to change converting from an STM32F411Nucleo to an STM32F401. All I changed was the size but am not sure if base address is different or any other settings…it was pretty overwhelming the first attempt lol.
You are going to learn by doin’ it …
The scatter files are all wrong
@Justin Which part/how do I fix it? I changed the flash size from 128 kb to 96 kb like the datasheet lists but was unsure what else needs changing
As i said the scatter files are all wrong - you need to change a half dozen lines or so in both tinybooter and tinyclr scatter files as you only have 96kb ram not 128km
And once you do that…
G30 processor running NETMF 4.4 in VS2017
I don’t understand what lines need changing other than line 20 in both scatterfiles, that is the only instance of 128 kb I can find. Can you give an example line that still refers to the 128 kb please?
<Set Name="Heap_BaseAddress" Value="0x20008000"/> <Set Name="Heap_Size" Value="0x00017000"/><!-- 92K --> <Set Name="Stack_Bottom" Value="0x2001DE00"/> <Set Name="Stack_Top" Value="0x2001FDF8"/> <Set Name="CustomHeap_Begin" Value="0x2001FE00"/> <Set Name="CustomHeap_End" Value="0x2001FFF8"/>
So your Heap, stack and Custom heap are sitting in a region lager than 96kb
ie 1FFF8 == 130,048 in decimal which == 127 which last time i looked is > than 96
Why is it calculated by 111F8 and not 2001FFF8?
Do the heap, stack, and custom heap all have to add up to less than 96? Or are they supposed to be 96 kb each?
If the custom heap begins at 1FE00 (130,560) and ends at 1FF8 (130,048), why isn’t the size of the region 130,560 - 130,048 = 512 / 1024?
Because you dont have 512MB of ram…
0x20000000 is the base address and you have 18000 which is 96kb ram
if you only have 96kb of ram then yes every thing has to fit in the 96kb ram
There is your problem - those settings are for a 128kb STM32F411 - you have to fit it all inside the lower 96kb
Where is the base of 0x20000000 coming from? I understand I have 0x00018000 kb of ram…that’s about as much as I understand so far lol
Should I make the heap, stack, and customheap equal sizes of 32 kB (to maintain a total < 96) or does one region need to be larger than the others?
I have no idea how to define the appropriate region “boundaries,” to correspond to my 96 kB of ram. What is the size of CustomHeap as it is now? 1FFF8 == 130,048 in decimal which == 127 kb, do you subtract the start address from this at all? Is the customHeap region 127 kb total or is it == (127 kb - customHeap_Begin)
…I think I am stuck on how the base addresses and starting addresses tie into the end address.
Nope - look at the 411 and follow it - ie make the Heap smaller and move them all into 96kb
Look closer at the start and end address for the 411 - Custom Heap is only 1F8 in size == 504 decimal
i tried to make and calculator
please can you check did i make well or have something (forgot)
@Justin please can you advise us more about
i tried to make an calculator in EXCEL to automate heaps calculation for scatter files
Custom heap doesn't really need in G30, instead of that, it is used to load interrupt vector. Check those values below if they look ok to you. <Set Name="Code_SRAMBaseAddress" Value="0x20000000" /> <Set Name="Code_SRAMSize" Value="0x00004000" /> <Set Name="Stack_Bottom" Value="0x20004000" /> <Set Name="Stack_Top" Value="0x20006DF8" /> <Set Name="Custom_Heap_Begin" Value="0x20006E00" /> <Set Name="Custom_Heap_End" Value="0x20006FF8" /> <Set Name="Heap_Begin" Value="0x20007000" /> <Set Name="Heap_End" Value="0x20017FF8" />
try this class / library
(you can modify it for your needs)
This should work: https://old.ghielectronics.com/downloads/man/G30_Datasheet.pdf
Also what version of Visual Studio should I be using now? I wrote all my programs in 2013, it says they are incompatible with 2015
I don’t see a device in VS2013
Netframework 4.4 is compatible with vs2015 and vs2017 with @Justin released vsix file
Netframework 4.3 is compatible with vs2013
I don’t see .NETMF as project type when trying to create a new project. I have the 4.4 SDK installed