[Gnuk-users] Port chopstx to STM32 Primer2

NIIBE Yutaka gniibe at fsij.org
Mon Jun 22 08:53:42 UTC 2015


On 06/22/2015 03:22 PM, Kaz Kojima wrote:
> AFAIK, we still need an external programmer.  I'm using SWD lines
> of F103 directly:
>   http://www.rr.iij4u.or.jp/~kkojima/primer2swd.html
> which is in Japanese, though I hope that the figures and picures
> say all.

Thank you for the picture.  I'll try with my STM32 Primer2.

I've incorporated the changes to Chopstx and NeuG.  I'll do that
for Gnuk, too.

Let me explain the changes, as it is a bit complicated.

Gnuk/NeuG device has system service routines (called "sys") in the
first pages of flash.  This is mainly because first pages cannot be
updated by the MCU itself if protected, so, it is good to have some
fixed routines.

There are two versions, sys v1.0 and v2.0.  I didn't included routines
for clock setting and GPIO initialization in sys v1.0.  Then, it was
figured out that it is better to include those two routines as system
service routines, so that the application program can be shared among
different boards.

The entry routine of Chopstx (in the file entry.c) will call
clock_init and gpio_init before calling the main routine.  If it is
configured with HAVE_SYS_H, it calls system routines in the "sys".
Or not, it calls the routines defined by itself (as sys v1.0 doesn't
include those services).

> After
>  dd if=/dev/ttyACM0 count=50 ibs=125000 iflag=fullblock of=rand-000.bin
> I've got:
> ------------------------
[...]
> mode: Conditioned
> Repeat errors: 0
> PP 64  errors: 0
> PP 4k  errors: 0
> Total  errors: 0
> Repeat max counts: 3
> PP 64  max counts: 5
> PP 4k  max counts: 36
> ------------------------

It looks good.
-- 



More information about the gnuk-users mailing list