Project update 2 of 2
This update gives you a quick start to using the IZIRUN boards. From experience, I know when I buy a development board, I expect to start developing code as quickly as possible so I can bring my ideas to life.
But the setup process to prepare your environment for work can be more complex than you think and provides lots of opportunity for errors. We will try to keep the IZIRUN setup process as simple as possible by showing you the steps to quickly start coding on IZIRUN boards running Little Kernel (LK) as RTOS.
The setup environment should be made on a Linux host machine running Ubuntu 18.04.
Binutils
sudo apt-get install binutils-arm-none-eabi
GCC Arm cross-compiler
sudo apt-get install gcc-arm-none-eabi
GDB debugger (optional)
sudo apt-get install gdb-multiarch
Install tools
sudo apt-get install gcc build-essential
sudo apt-get install git
make cmake libusb-1.0-0-dev
Install stlink in case you need to flash through SWD Debugger
git clone https://github.com/stlink-org/stlink
cd stlink
cmake make
# install binaries
sudo cp bin/st-* /usr/local/bin
# install udev rules
sudo cp config/udev/rules.d/49-stlinkv* /etc/udev/rules.d/
# restart udev
sudo udevadm control --reload
Install stm32flash-code in case you need to flash through UART
git clone https://git.code.sf.net/p/stm32flash/code stm32flash-code
cd stm32flash-code
make
sudo make install
The LK project is split into three packages: lk
, devices_lk
, and izirunfx_lk
. Thanks to a mechanism that allows you to build outside of the LK tree, your work directory can be keep out of the lk kernel project. By overwriting layers like targets, apps, or libs, you can keep user code separate, which makes it easier to build and maintain projects off the main LK tree.
lk
= little kernel RTOS
devices_lk
= driver for external device (memories, sensors, transceivers, etc. )
izirunfx_lk
= is the bsp for IZIRUN boards (izirunf0_lk, izirunf4_lk, izirunf7_lk)
The lk
and devices_lk
packages are a common part for all the IZIRUN boards.
Download lk
git clone https://bitbucket.org/izi_team/lk.git -b izitron
Download devices_lk
git clone https://bitbucket.org/izi_team/devices_lk.git
Download izirunf0_lk
git clone https://bitbucket.org/izi_team/izirunf0_lk.git
At this moment, the structure of the project should be like this:
$ ls
devices_lk izirunf0_lk lk
Go to izirunf0_lk and build the project
cd izirunf0_lk
make
If everything is ok at the end of the build you should see something like:
generating image: izirunf0_lk/build-izirunf0_izigoboard/lk.bin
text data bss dec hex filename
55332 84 10464 65880 10158 izirunf0_lk/build-izirunf0_izigoboard/lk.elf
Using ST-Link SWD
st-flash write build-izirunf0_izigoboard/lk.bin 0x8000000
Using UART
stm32flash -w build-izirunf0_izigoboard/lk.bin -v /dev/ttyUSB0
After flashing is complete, push the reset button. You should see:
welcome to lk
boot args 0x20000460 0x24e4 0x24e0 0x24e4
INIT: cpu 0, calling hook 0x8003651 (version) at level 0x3ffff, flags 0x1
version:
arch: arm
platform: stm32f0xx
target: izirunf0
project: izirunf0_izigoboard
buildid: K6K96_LOCAL
Download izirunf4_lk
git clone https://bitbucket.org/izi_team/izirunf4_lk.git
At this moment, the structure of the project should look like this:
ls
devices_lk izirunf0_lk izirunf4_lk lk
Note: the izirunf0_lk directory is present because ran clone previously, but there is no dependency with izirunf4_lk
Go to izirunf4_lk and build the project
cd izirunf4_lk
make
If everything is ok at the end of the build you should see something like:
generating image: izirunf4_lk/build-izirunf4_izigoboard/lk.bin
text data bss dec hex filename
54988 120 10316 65424 ff90 izirunf4_lk/build-izirunf4_izigoboard/lk.elf
Using ST-Link SWD
st-flash write build-izirunf4_izigoboard/lk.bin 0x8000000
Using UART
stm32flash -w build-izirunf4_izigoboard/lk.bin -v /dev/ttyUSB0
After flashing is complete, push the reset button. You should see:
welcome to lk
boot args 0x800d6cc 0x0 0x200028cc 0x200028cc
INIT: cpu 0, calling hook 0x8004439 (version) at level 0x3ffff, flags 0x1
version:
arch: arm
platform: stm32f4xx
target: izirunf4
project: izirunf4_izigoboard
buildid: K6KA6_LOCAL
Download izirunf7_lk
git clone https://bitbucket.org/izi_team/izirunf7_lk.git
At this moment the structure of the project should by like this:
ls
devices_lk izirunf0_lk izirunf4_lk izirunf7_lk lk
Note: the izirunf0_lk and izirunf4_lk directory are present because we cloned previously, but there is no dependency with izirunf7_lk
Go to izirunf7_lk and build the project
cd izirunf7_lk
make
If everything is ok at the end of the build you should see something like:
generating image: izirunf4_lk/build-izirunf4_izigoboard/lk.bin
text data bss dec hex filename
54988 120 10316 65424 ff90 izirunf4_lk/build-izirunf4_izigoboard/lk.elf
Using ST-Link SWD
st-flash write build-izirunf7_izigoboard/lk.bin 0x8000000
Using UART
stm32flash -w build-izirunf7_izigoboard/lk.bin -v /dev/ttyUSB0
After flashing is complete, push the reset button. You should see:
welcome to lk
boot args 0x800d6cc 0x0 0x200028cc 0x200028cc
INIT: cpu 0, calling hook 0x8004439 (version) at level 0x3ffff, flags 0x1
version:
arch: arm
platform: stm32f7xx
target: izirunf7
project: izirunf7_izigoboard
buildid: K4KC6_LOCAL