[Gnuk-users] Gnuk on a faster MCU

Aurelien Jarno aurelien at aurel32.net
Tue Oct 10 20:15:05 UTC 2017


On 2017-09-14 14:42, NIIBE Yutaka wrote:
> Aurelien Jarno <aurelien at aurel32.net> wrote:
> > Also those MCU seems to only have 256B of cache, and for what I have
> > seen on the STM32L, the cache is important to mask the wait states and
> > get good performances.
> 
> Thank you.  I see.
> 
> Let me write about another topic.
> 
> We have "SYS" routines for STM32F103 in Chopstx.  I named it as system
> service routines, as I wrote some in chopstx/mcu/ABOUT-SYS.  It is used
> for STM32F103 boards, mainly, because STM32F103 cannot change the first
> 4KB flash ROM by its running program and it doesn't have USB support
> from its boot ROM.
> 
> Gnuk (and NeuG) supports the feature of upgrading program through USB,
> using these SYS routines.
> 
> I think that the restriction of STM32F103 is strange and peculiar, from
> the viewpoint of newer implementations of MCU with USB.  I guess that
> USB was not that mature or it required more code size.
> 
> Nowadays, most MCU would support flash ROM programming through USB by
> boot ROM.  For those MCUs, all that Gnuk would need is to erase all
> flash ROM;  Next reset let MCU go into "boot mode", and a user can use
> standard tool to program its MCU.

For recent MCUs, it seems the way to go to me. In most case the "boot
mode" is USB DFU, which should be relatively straightforward for users
(including on non-Linux). That said as there are multiple way to enter
this "boot mode", like jumping to the boot ROM code, I would like to
stress that it's important for Gnuk to do it by erasing the whole flash
to make sure leakage of key material is not possible. The USB DFU
protocol supports both firmware upload and download.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                 http://www.aurel32.net



More information about the gnuk-users mailing list