[Gnuk-users] STM32 Primer 2

NIIBE Yutaka gniibe at fsij.org
Tue Jul 14 02:13:36 UTC 2015


On 07/13/2015 02:32 PM, Kaz Kojima wrote:
> BTW, I've uploaded the tarball of my primer2 example as
>   http://www.rr.iij4u.or.jp/~kkojima/junkyard/example-primer2.tar.bz2
> though it's not completed yet.

Great.  Thank you.

> It requires a few fixes of board/board-stm32-primer2.h for switches
> and the addition of initializer of vector_table in entry.c for ADC3
> EOC interrupt.  I'm not sure whether the latter is a good idea or not.
> I've attached diffs anyway.

I've incorporated your changes into Chopstx repo.


The small problem would be: the size of vectors matters for small
flash memory board.  I put #ifdef/#endif so that it could be smaller
for a specific board.

This means that if a user wants to prepare common binary application,
the vector size should be the largest one.

Besides, I think I finally got the concrete idea how we support common
binary application among different boards.  Well, for general purpose
application for large systems, FDT would be a practice and good choice.
For applications like Gnuk/NeuG, I think that less is better, given
the condition number of boards supported is not that huge.

(1) The requirement for clock settings (STM32_PLLXTPRE,
    STM32_PLLMUL_VALUE, STM32_HSECLK and RCC_ENR_IOP_EN, RCC_RSTR_IOP_RST)
    should be there.

(2) The requirement for mandatory LED and optional USB dis-connector
    in board-*.h is reasonable.

(3) The (current) requirement having NeuG settings in each board-*.h
    is not that good.

(4) Future requirement of an identifier of board in each board-*.h is
    good, so that a driver can select settings depending on the board.

For (4), I tested string identifier yesterday, but it would be better
to adopt 32-bit identifier for a board.

I'm going to improve Chostix in this direction.  Then, I'll fix NeuG
for its ADC driver.  The settings of (3) will be moved into the ADC
driver.

For Gnuk, flash memory management is also required to fix to be
chip-independent.

It's also good for an application to have a USB string to identify the
board.
-- 



More information about the gnuk-users mailing list