gnuk/doc/development.rst

65 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2012-07-21 00:26:51 +00:00
Development Environment
=======================
Hardware
--------
2012-12-26 02:11:18 +00:00
For development, it is highly recommended to have JTAG/SWD debugger.
2012-08-02 08:11:42 +00:00
2012-12-26 02:11:18 +00:00
For boards with DFU (Device Firmware Upgrade) feature (such as DfuSe),
2012-08-02 08:11:42 +00:00
it is possible to develop with that. But it should be considered
*experimental* environment, and it should not be used for usual
purpose. That's because it is basically impossible for DfuSe
implementations to disable reading-out from flash ROM. It means
2013-10-24 07:02:50 +00:00
that your secrets will be readily extracted by DfuSe.
2012-08-02 08:11:42 +00:00
For JTAG debugger, Olimex JTAG-Tiny is good and supported well. For
SWD debugger, ST-Link/V2 would be good, and it is supported by
2012-12-26 02:11:18 +00:00
tool/stlinkv2.py.
2012-08-02 08:11:42 +00:00
OpenOCD
-------
2013-10-24 07:02:50 +00:00
For JTAG/SWD debugger, we can use OpenOCD somehow.
2012-08-02 08:11:42 +00:00
2013-10-24 07:02:50 +00:00
Note that ST-Link/V2 was *not* supported by OpenOCD 0.5.0.
It is supported by version 0.6 or later somehow, but still, you can't
enable protection of flash ROM with OpenOCD using ST-Link/V2.
2012-07-21 00:26:51 +00:00
GNU Toolchain
-------------
You need GNU toolchain and newlib for 'arm-none-eabi' target.
2012-12-26 02:11:18 +00:00
There is "gcc-arm-embedded" project. See:
https://launchpad.net/gcc-arm-embedded/
2013-12-25 02:33:00 +00:00
It is based on GCC 4.8 (as of December, 2013). We are using "-O3 -Os"
2013-10-24 07:02:50 +00:00
for compiler option.
2012-07-21 00:26:51 +00:00
Building Gnuk
-------------
Change directory to ``src``:
$ cd gnuk-VERSION/src
Then, run ``configure``:
$ ./configure --vidpid=<VID:PID>
Here, you need to specify USB vendor ID and product ID. For FSIJ's,
2012-12-26 02:11:18 +00:00
it's: --vidpid=234b:0000 . Please read the section 'USB vendor ID and
product ID' in README.
2012-07-21 00:26:51 +00:00
Type:
$ make
2013-10-24 07:02:50 +00:00
Then, we will have "gnuk.elf" under src/build directory.