STM32F3 ports
Re: STM32F3 ports
Which cache are you referring to?
It looks like the flash memory on the STM32F303xC is arranged as 128 pages of 2Kbytes each. On the F4 it has much larger flash blocks, so the 64K CCM memory winds up getting used for the filesystem. On the F303 it looks like there is 40K of SRAM and 8K of CCM SRAM.
The heap/stack should go in the 40K SRAM, and I'd probably wind up using the 8K CCM SRAM for the file system. I'm not sure if this is what you mean by cache? Some of the processors like the F7/H7 have real data/instruction caches.
It looks like the flash memory on the STM32F303xC is arranged as 128 pages of 2Kbytes each. On the F4 it has much larger flash blocks, so the 64K CCM memory winds up getting used for the filesystem. On the F303 it looks like there is 40K of SRAM and 8K of CCM SRAM.
The heap/stack should go in the 40K SRAM, and I'd probably wind up using the 8K CCM SRAM for the file system. I'm not sure if this is what you mean by cache? Some of the processors like the F7/H7 have real data/instruction caches.
Re: STM32F3 ports
In flashbdev.c is the remaining problem!dhylands wrote:Which cache are you referring to?
It looks like the flash memory on the STM32F303xC is arranged as 128 pages of 2Kbytes each. On the F4 it has much larger flash blocks, so the 64K CCM memory winds up getting used for the filesystem. On the F303 it looks like there is 40K of SRAM and 8K of CCM SRAM.
The heap/stack should go in the 40K SRAM, and I'd probably wind up using the 8K CCM SRAM for the file system. I'm not sure if this is what you mean by cache? Some of the processors like the F7/H7 have real data/instruction caches.
Trimis de pe al meu SM-N9005 folosind Tapatalk
Re: STM32F3 ports
Ok. I'll give a try tomorrow. If succeeded, I'll let you know!dhylands wrote:I'd use the 8K CCM SRAM for the flash cache.
Re: STM32F3 ports
Solved one!
Got another error!
Thanks,
Romeo
Got another error!
Thanks,
Romeo
Re: STM32F3 ports
It looks like you need to add the following line to ports/stm32/Makefile: in this block: https://github.com/micropython/micropyt ... kefile#L71
Make sure you do a clean, because all of the objects will have been built for the wrong MCU.
Then you'll run into a few more issues in stm32_it.c that aren't as straight forward.
For the first error, I think that you just need to add __IO to the extern declaraion of uwTick.
For the issues that I see you'll need to see what the macros do on the F4 and then see if there is equivalent functionality on the F3 by comparing datasheets. It's possible that you'll need to add some #if's or something.
For the CAN stuff I suspect that the CAN peripheral is slightly different between the F3 and F4 and so will most likely require some #ifs
For any changes you make to stm32_it.c you'll want to try build for some other boards to make sure that they continue to work.
Code: Select all
CFLAGS_MCU_f3 = $(CFLAGS_CORTEX_M) -mtune=cortex-m3 -mcpu=cortex-m3
Make sure you do a clean, because all of the objects will have been built for the wrong MCU.
Then you'll run into a few more issues in stm32_it.c that aren't as straight forward.
For the first error, I think that you just need to add __IO to the extern declaraion of uwTick.
For the issues that I see you'll need to see what the macros do on the F4 and then see if there is equivalent functionality on the F3 by comparing datasheets. It's possible that you'll need to add some #if's or something.
For the CAN stuff I suspect that the CAN peripheral is slightly different between the F3 and F4 and so will most likely require some #ifs
For any changes you make to stm32_it.c you'll want to try build for some other boards to make sure that they continue to work.
Re: STM32F3 ports
Hi,
I made one step forward, but still in error!
Can't figure out what should be in here!
I've tried to compare with files on st.com ... but it doesn't seem to work!
Any ideas?
Thanks,
Romeo
I made one step forward, but still in error!
Can't figure out what should be in here!
I've tried to compare with files on st.com ... but it doesn't seem to work!
Any ideas?
Thanks,
Romeo
Re: STM32F3 ports
The F3 doesn't have a PHY control, so I'd put around that line.
For the others, I disabled USB and CAN and then it gets further. The USB peripheral on the F3 looks to be totally different from the F4, so I suspect that quite a few changes will be required to support that.
Code: Select all
#if defined(__HAL_PCD_UNGATE_PHYCLOCK) // Not available on the F3
For the others, I disabled USB and CAN and then it gets further. The USB peripheral on the F3 looks to be totally different from the F4, so I suspect that quite a few changes will be required to support that.
Re: STM32F3 ports
Ok. Tried that. Still the errors appears!
Thanks,
Romeo
Thanks,
Romeo
Re: STM32F3 ports
The PLL portion seems to be different between the F3 and the F4, so you'll need to change things to work with the F3.