SlideShare a Scribd company logo
Share the Experience of
Using Embedded
Development Board
潘建宏 Jian-Hong Pan (StarNight)
@ COSCUP 2023
Who am I
潘建宏 / Jian-Hong Pan (StarNight)
Endless OS Foundation
You can find me at
● http://www.slideshare.net/chienhungpan/
● GitHub: starnight
● Twitter: starnight_pan
● Email:
jhp [AT] endlessos.org
chienhung.pan [AT] gmail.com
Background
● Due to the pandemic in the past few years, lacking chips has become one of
the reasons that vendors cannot produce products. That affects industry,
automotive and IT, etc.
● Many countries propose new policies/acts which start to investigate the
source of products recently.
Therefore, keeping the flexibility of the usage of parts to maintain the robustness
of productivity and service is an important skill.
Well-Known Chip Architectures
Including MCU and CPU
● PIC
● x86(_64)
● ARM (8, 32 and 64 bits)
● AVR (8 and 32 bits)
● RISC-V (32, 64 bits and …)
● … and more
Development Environment
Common
GCC, GDB, make … or known as toolchain
Embedded system
OpenOCD, JTAG, USB to serial (option) and Board Support Package (BSP)
Cross Compiler
{arch}-{project …}-{gcc, gdb, ld, objcopy, objdump …}
Host (x86_64)
Cross compile
source code
Target (ARM, RISC-V)
Executable binary
Examples
Microcontroller Unit (MCU) Level
● Cortex-M4: Nuvoton’s NuTiny-SDK-NUC472
● RISC-V (32 bits): Sipeed Longan Nano
Central Processor Unit (CPU) Level
● Cortex-A72: Raspberry Pi 4B
● RISC-V (64 bits): QEMU Virtual Machine
Start from MCU Level First
ARM Cortex-M Comparison
Arm Core Cortex-M0 … Cortex-M4 … Cortex-M23 …
ARM architecture ARMv6-M ARMv7E-M
ARMv8-M
Baseline
Instruction pipeline 3 stages 3 stages 2 stages
Multiply instructions
32x32 = 32-bit result
Yes
Multiply instructions
32x32 = 64-bit result
No Yes No
Divide instructions
32/32 = 32-bit quotient
No Yes
DSP instructions No Yes NO
TrustZone security instructions No No Optional
Reference: Table: ARM Cortex-M instruction variations of ARM Cortex-M
NuTiny-SDK-NUC472’s Dev Environment
My host is an Arch Linux (x86_64) system. The target chip is Nuvoton's
NUC472HI8AE, an ARM Cortex-M4 MCU. Therefore, install the “arm-none-eabi-”
toolchain packages:
● arm-none-eabi-binutils
● arm-none-eabi-gcc
● arm-none-eabi-newlib
● arm-none-eabi-gdb
I prefer the Makefile tool. So, make is installed, too.
Note: Nuvoton marks NUC472HI8AE as Not Recommended For New Designs
(NRND) now. Recommended Part Number: M487 Ethernet Series
NuTiny-SDK-NUC472 Dev Environment (cont.)
Also, need OpenOCD to flash and debug.
● Upstream OpenOCD must includes these commits at least:
○ flash/nor/numicro: reorder the parts list
○ flash: support Nuvoton M541 & NUC442/472 series
○ tcl: add a configuration file for Nuvoton M541 & NUC442/472 series
The commits have been merged into the master branch.
● Or, downstream Nuvoton OpenOCD
I use this one
Nu-Link-Me
NuTiny-EVB-NUC472
NuTiny-SDK-NUC472 Board
NUC472-NuTiny’s LED Sample as the Example
Nuvoton has provided the NUC472/442 BSP at
https://github.com/OpenNuvoton/NUC472_442BSP, which follows Common
Microcontroller Software Interface Standard (CMSIS).
$ git clone https://github.com/OpenNuvoton/NUC472_442BSP
$ cd NUC472_442BSP/SampleCode/NUC472-NuTiny/LED/
And, have to add a Makefile into the LED sample code directory, for compile,
clean and flash.
CMSIS, Standard and Device Libraries for the Makefile
NUC472/442 BSP provides the libraries:
● CMSIS library is under path Library/CMSIS.
● Standard library is under path Library/StdDriver.
● NUC472/442’s library is under path Library/Device/Nuvoton/NUC472_442.
● NUC472/442’s system clock initialization is at
Library/Device/Nuvoton/NUC472_442/Source/system_NUC472_442.c.
● NUC472/442’s startup file is at
Library/Device/Nuvoton/NUC472_442/Source/GCC/startup_NUC472_442.S.
● NUC472/442’s linker file is at
Library/Device/Nuvoton/NUC472_442/Source/GCC/gcc_arm.ld.
Build the LED Application with make
$ make
arm-none-eabi-gcc -I../../../../NUC472_442BSP/Library/CMSIS/Include
-I../../../../NUC472_442BSP/Library/StdDriver/inc
-I../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Include -I. -ggdb -Os -Wall -Wextra
-Warray-bounds -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork -mfloat-abi=hard
-mfpu=fpv4-sp-d16
-T../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/GCC/gcc_arm.ld main.c
../../../../NUC472_442BSP/Library/StdDriver/src/clk.c
../../../../NUC472_442BSP/Library/StdDriver/src/gpio.c
../../../../NUC472_442BSP/Library/StdDriver/src/sys.c
../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/system_NUC472_442.c
../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/GCC/startup_NUC472_442.S -o
LED.elf
...
arm-none-eabi-objcopy -O ihex LED.elf LED.hex
arm-none-eabi-objcopy -O binary LED.elf LED.bin
Flash the built image into NuTiny-SDK-NUC472
Connect the NuTiny-SDK-NUC472 to your host via the USB cable. And, flash:
$ make flash # May need root privilege for opening Nu-Link device
openocd -f "interface/nulink.cfg" -f "target/numicro_m4.cfg" -c "program LED.elf verify reset exit"
…
** Programming Started **
Info : Device ID: 0x00047201
Info : Device Name: NUC472HI8AE
Info : bank base = 0x00000000, size = 0x00080000
Warn : Adding extra erase range, 0x00001770 .. 0x000017ff
Info : Nuvoton NuMicro: Sector Erase ... (0 to 2)
Info : Nuvoton NuMicro: Flash Write ...
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked
After flash, the onboard LED should become blinking.
Flash & Debug with GDB via OpenOCD and Nu-Link
Host
OpenOCD
Built Binary
Target Machine
NuTiny-EVB-NUC472
Nu-Link-Me
as the JTAG
1. Start the gdb server with Nu-Link and the numicro M4 configs:
$ openocd -f "interface/nulink.cfg" -f "target/numicro_m4.cfg"
…
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain
JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : Nu-Link firmware_version 6535, product_id (0x00012009)
Info : Adapter is Nu-Link
Info : IDCODE: 0x2BA01477
Info : [NuMicro.cpu] Cortex-M4 r0p1 processor detected
Info : [NuMicro.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for NuMicro.cpu on 3333
Info : Listening on port 3333 for gdb connections
[NuMicro.cpu] halted due to breakpoint, current mode: Thread
xPSR: 0x01000000 pc: 0x00000f5c msp: 0x20010000
2. Have the gdb client connecting to the gdb server listening on port 3333 to
debug the LED.elf flashed on the MCU chip Nuvoton NUC472HI8AE:
$ arm-none-eabi-gdb LED.elf
...
Reading symbols from LED.elf...
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
warning: Overlapping regions in memory map: ignoring
Reset_Handler () at
../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/GCC/startup_NUC472_442.S:268
268 ldr r1, =__etext
(gdb) hbreak main.c:86
Hardware assisted breakpoint 1 at 0x3a2: file main.c, line 86.
(gdb) continue
Continuing.
Breakpoint 1, main () at main.c:86
86 PB10 = 0;
(gdb)
Use hbreak (hardware-assisted breakpoint) to add a break point, instead of break.
Reference: 5.1.1 Setting Breakpoints
RISC-V Capability, RISC-V@Andes as the Example
AndeStar™ V5 Architecture:
● Supports both 32-bits (RV32) and 64-bits (RV64)
● 32-bit N25, N25F, D25F, A25 and A27;
64-bit NX25, NX25F, AX25, and AX27
● N25F, NX25F, A25 and AX25 supports single and double precision floating
point for high-precision data computations
● D25F, A25 and AX25 supports DSP/SIMD instructions
Reference: RISC-V@Andes
Sipeed Longan Nano's Dev Environment
According to Longan Nano’s introduction, the target chip is a GD32VF103 MCU
using Andes’ core with RISC-V 32 bits ISA. Therefore, install the “riscv64-elf-”
toolchain packages:
● riscv64-elf-binutils
● riscv64-elf-gcc
● riscv64-elf-newlib
● riscv64-elf-gdb
The make is a preferred tool and need OpenOCD to flash and debug.
List riscv64-elf- Toolchain Supported Architectures
$ riscv64-elf-gcc --version | head -n1
riscv64-elf-gcc (Arch Linux Repositories) 12.2.0
$ riscv64-elf-gcc --print-multi-lib
.;
rv32i/ilp32;@march=rv32i@mabi=ilp32
rv32im/ilp32;@march=rv32im@mabi=ilp32
rv32iac/ilp32;@march=rv32iac@mabi=ilp32
rv32imac/ilp32;@march=rv32imac@mabi=ilp32
rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f
rv64imac/lp64;@march=rv64imac@mabi=lp64
rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d
Tweak Longan Nano’s BSP
GD32VF103 Microcontroller has GD32VF103_Firmware_Library. However, it
suggests Nuclei SDK!?
$ git clone https://github.com/Nuclei-Software/nuclei-sdk
$ cd nuclei-sdk
I have some modification to use the bare-metal toolchain “riscv64-elf-”:
● Use common RISC-V 64 bare-metal toolchain
● Set ISA spec version as 2.2 to support extension zicsr
● Use mainline OpenOCD’s gd32vf103.cfg as the config. Besides, I use FTDI
FT232HQ board as the the JTAG interface. So, use um232h.cfg as the config.
Have an LED Application as the Example
Add the LED application referring to sibling helloworld:
$ ls application/baremetal/led/
main.c Makefile npk.yml
1. Get into the led app:
$ cd application/baremetal/led
2. Disable the optimization for GDB with -O0.
3. Build:
$ make SOC=gd32vf103 BOARD=gd32vf103c_longan_nano all
4. Flash:
$ make SOC=gd32vf103 BOARD=gd32vf103c_longan_nano upload
5. It will light RGB LEDs in order periodically.
Flash & Debug with GDB via OpenOCD and FTDI
Host
OpenOCD
Built Binary
Target Machine
Sipeed Longan Nano
FTDI FT232H
as the JTAG
JTAG interface
Reference: Longan Documentation -> PIN Map & Longan-DOC with Apache License Version 2.0
1. Connect the TCK, TDO, TDI, TMS and GND pins between FT232H and the
Sipeed Longan Nano board.
2. Start the gdb server with FT232H as JTAG interface and GD32VF103 as the
target configs:
$ openocd -f interface/ftdi/um232h.cfg -f target/gd32vf103.cfg
…
Warn : An adapter speed is not selected in the init scripts. OpenOCD will try to run the adapter at the low
speed (100 kHz)
Warn : To remove this warnings and achieve reasonable communication speed with the target, set
"adapter speed" or "jtag_rclk" in the init scripts.
Info : clock speed 100 kHz
Info : JTAG tap: gd32vf103.cpu tap/device found: 0x1000563d (mfg: 0x31e (Andes Technology
Corporation), part: 0x0005, ver: 0x1)
Info : JTAG tap: auto0.tap tap/device found: 0x790007a3 (mfg: 0x3d1 (GigaDevice Semiconductor
(Beijing) Inc), part: 0x9000, ver: 0x7)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 5 -expected-id 0x790007a3"
Info : datacount=4 progbufsize=2
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40901105
Info : starting gdb server for gd32vf103.cpu on 3333
Info : Listening on port 3333 for gdb connections
3. Have the gdb client connecting to the gdb server to debug the led.elf flashed
on the MCU chip GD32VF103C8T6:
$ riscv64-elf-gdb led.elf
...
Reading symbols from led.elf...
(gdb) target extended-remote localhost:3333
Remote debugging using localhost:3333
0x080016ee in SysTimer_GetLoadValue ()
at ../../../NMSIS/Core/Include/core_feature_timer.h:151
151 if (high0 != high) {
(gdb) break main.c:68
Breakpoint 1 at 0x8001d9c: file main.c, line 68.
Note: automatically using hardware breakpoints for read-only addresses.
(gdb) continue
Continuing.
Breakpoint 1, main () at main.c:68
68 gpio_bit_reset(GPIOC, GPIO_PIN_13);
(gdb)
How about CPU Level
Boot Linux System
Linux Kernel Boots
Chip
x86(_64)
arm(64)
RISC-V
…
Firmware
BIOS/UEFI
firmwares
…
Bootloader
GRUB
LILO
SYSLINUX
U-Boot
…
Kernel
Linux
(initramfs)
Init
PID 1
Build Linux Kernel with arm64 Arch
The cross compilation toolchain’s prefix is “aarch64-linux-gnu-”. Use
aarch64-linux-gnu-gcc as the compiler.
1. Get Linux kernel
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
2. Build
$ cd linux
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
Have a Blank Disk to Boot QEMU VM
$ fdisk -l blank.img
Disk blank.img: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf80638ed
Device Boot Start End Sectors Size Id Type
blank.img1 * 1 2049 2049 1M b W95 FAT32
blank.img2 2050 8191 6142 3M 83 Linux
Just a quick test!
Boot the QEMU VM with Linux Kernel & Blank Disk
Install packages: qemu-system-aarch64
$ qemu-system-aarch64 
-smp 2 
-M virt -cpu cortex-a57 
-m 1G 
-kernel ~/linux/arch/arm64/boot/Image 
--append "console=ttyAMA0 root=/dev/vda2" 
-hda ~/qemuimg/blank.img 
-serial stdio
Linux Kernel Tries to Find init in the Filesystem
…
[ 2.146201] Run /sbin/init as init process
[ 2.148061] Run /etc/init as init process
[ 2.149846] Run /bin/init as init process
[ 2.150521] Run /bin/sh as init process
[ 2.151871] Kernel panic - not syncing: No working init found. Try passing init=
option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
…
The Init Process
In Unix-based computer operating systems, init (short for initialization) is the first
process started during booting of the computer system. Init is a daemon process
that continues running until the system is shut down. ~ from init on Wiki
● SysVInit
● Upstart
● Systemd
● OpenRC
● …
● Busybox
$ ls -l /bin/init # on my laptop
lrwxrwxrwx 1 root root 22 Jun 20 05:41 /bin/init -> ../lib/systemd/systemd
System Storage Layout
Boot Partition:
● Boot loader
● Kernel, Initial RAM disk, Device Tree Blobs
Root Partition:
● /boot
● /sbin, /bin
● /usr, /lib
● /etc
● /dev, /proc, /sys
● /root
● /tmp, /var, /mnt
● …
init
Build a System Image Containing Root Filesystem
1. Have a raw image
2. Format the raw image with designed partitions layout
3. Mount the root partition to the QEMU VM by the architecture
4. Install system packages, applications into the root partition.
Also, known as bootstrap.
5. Prepare config files for the init process into the root partition
6. Prepare /etc/fstab for mount points
7. Prepare config files for other processes into the root partition: Network,
DHCP, DNS …
8. Unmount the root partition
Note: Step 5 ~ 7 depend on the hardware and case by case.
Build System Images with GitHub Actions
Build kernel:
https://github.com/starnight/build-kernel/blob/main/.github/workflows/main.yml
Build system image with Alpine container images:
https://github.com/starnight/build-image/blob/main/.github/workflows/image.yml
1. Build root filesystem within the architecture’s container environment, for
example aarch64
2. Create a RAW image and partitions
3. Mount the partitions and deploy the root filesystem into the partitions
https://github.com/starnight/build-image/releases
The Images
Boot with the Built Image on Raspberry Pi
Welcome to Alpine Linux 3.18
Kernel 6.4.2 on an aarch64 (/dev/ttyS1)
alpine-arm64 login: root
Welcome to Alpine!
…
alpine-arm64:~# dmesg
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[ 0.000000] Linux version 6.4.2 (runner@fv-az470-332) (aarch64-linux-gnu-gcc (Ubuntu
11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP
PREEMPT Sat Jul 8 04:19:40 UTC 2023
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.1
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000037400000, size
64 MiB
…
Please Refer for More Detail
● Debug Linux Kernel on Raspberry Pi:
Let's trace Linux Kernel with KGDB
● Build Root Filesystem for Raspberry Pi:
Launch the First Process in Linux System
Build Linux Kernel with RISC-V 64 Bits Arch
The cross compilation toolchain’s prefix is “riscv64-linux-gnu-”. Use
riscv64-linux-gnu-gcc as the compiler.
1. Get Linux kernel
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
2. Build
$ cd linux
$ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig
$ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- menuconfig
$ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-
Boot the kernel with Root Filesystem on QEMU VM
Install packages: qemu-system-riscv and qemu-system-riscv-firmware
The root filesystem can be downloaded from starnight/build-image’s Releases.
$ qemu-system-riscv64 
-M virt -smp 4 -m 2G -display none -serial stdio 
-kernel ~/linux/arch/riscv/boot/Image 
-append "console=ttyS0 root=/dev/vda2 rw rootfstype=ext4" 
-drive file=/tmp/simple-alpine-qemu_riscv64.img,format=raw,id=hd0 
-device virtio-blk-device,drive=hd0 
-netdev user,id=usernet -device virtio-net-device,netdev=usernet
Tune the Build Config to Debug RISC-V QEMU VM
● The option CONFIG_SOC_VIRT is for QEMU virtual machine.
● For debug
○ CONFIG_DEBUG_INFO=y
○ # CONFIG_DEBUG_INFO_REDUCED is not set
○ CONFIG_GDB_SCRIPTS=y
○ CONFIG_FRAME_POINTER=y
Boot with the Built Image on QEMU VM (RISC-V 64)
Welcome to Alpine Linux 3.18
Kernel 6.4.2 on an riscv64 (/dev/ttyS0)
alpine-arm64 login: root
Welcome to Alpine!
…
alpine-arm64:~# dmesg
[ 0.000000] Linux version 6.4.2 (zack@starnight) (riscv64-linux-gnu-gcc (GCC)
12.2.0, GNU ld (GNU Binutils) 2.39) #3 SMP Sun Jul 9 11:30:02 CST 2023
[ 0.000000] random: crng init done
[ 0.000000] Machine model: riscv-virtio,qemu
[ 0.000000] efi: UEFI not found.
[ 0.000000] OF: reserved mem: 0x0000000080000000..0x000000008003ffff
(256 KiB) map non-reusable mmode_resv0@80000000
…
Boot the RISC-V 64 System for Online Debug
Append -S and -s to QEMU command:
$ qemu-system-riscv64 -h
...
-S freeze CPU at startup (use 'c' to start execution)
…
-gdb dev accept gdb connection on 'dev'. (QEMU defaults to starting
the guest without waiting for gdb to connect; use -S too
if you want it to not start execution.)
-s shorthand for -gdb tcp::1234
1. Boot the QEMU virtual machine with debug feature
$ qemu-system-riscv64 
-M virt -smp 4 -m 2G -display none -serial stdio 
-kernel ~/linux/arch/riscv/boot/Image 
-append "console=ttyS0 root=/dev/vda2 rw rootfstype=ext4" 
-drive file=/tmp/simple-alpine-qemu_riscv64.img,format=raw,id=hd0 
-device virtio-blk-device,drive=hd0 
-netdev user,id=usernet -device virtio-net-device,netdev=usernet 
-s -S
Note: It freezes CPU at startup
2. Install riscv64-linux-gnu-gdb as the debugger
3. Start RISC-V 64’s GDB in the linux project folder, then debug:
$ cd ~/linux-stable && riscv64-linux-gnu-gdb vmlinux
...
Reading symbols from vmlinux...
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x0000000000001000 in ?? ()
(gdb) break virtnet_probe
Breakpoint 1 at 0xffffffff806b87dc: file drivers/net/virtio_net.c, line 3879.
(gdb) continue
Continuing.
[Switching to Thread 1.2]
Thread 2 hit Breakpoint 1, virtnet_probe (vdev=0xff60000001e6b040) at drivers/net/virtio_net.c:3879
3879 {
(gdb)
Reference
● QEMU ARM guest support
● First Kernel Patch
● Linux Documentation/admin-guide/init.rst
● fdisk, mkfs.vfat, mkfs.ext4 and mount
● Alpine
● The Linux Bootdisk HOWTO - 4. Building a root filesystem
● Bootstrapping Alpine Linux
● RISC-V Specifications
APPENDIX - AVR’s Development Environment
AVR series MCUs are used widely on Arduino classic boards. Therefore, install
the “avr-” toolchain packages:
● avr-gcc
● avr-gdb
● avr-libc
And, the flash tool: avrdude
Prepared some examples in AVR practice repository.
https://github.com/starnight/AVR-practice

More Related Content

What's hot

Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
Yan Vugenfirer
 
ZynqMPのQEMU
ZynqMPのQEMUZynqMPのQEMU
ZynqMPのQEMU
Mr. Vengineer
 
用十分鐘 向jserv學習作業系統設計
用十分鐘  向jserv學習作業系統設計用十分鐘  向jserv學習作業系統設計
用十分鐘 向jserv學習作業系統設計
鍾誠 陳鍾誠
 
FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料
一路 川染
 
プログラムを高速化する話Ⅱ 〜GPGPU編〜
プログラムを高速化する話Ⅱ 〜GPGPU編〜プログラムを高速化する話Ⅱ 〜GPGPU編〜
プログラムを高速化する話Ⅱ 〜GPGPU編〜
京大 マイコンクラブ
 
Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)
Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)
Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)
Takayasu Shibata
 
レシピの作り方入門
レシピの作り方入門レシピの作り方入門
レシピの作り方入門
Nobuhiro Iwamatsu
 
from Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Worksfrom Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Works
National Cheng Kung University
 
ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)
ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)
ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)
Mr. Vengineer
 
GPU仮想化最前線 - KVMGTとvirtio-gpu -
GPU仮想化最前線 - KVMGTとvirtio-gpu -GPU仮想化最前線 - KVMGTとvirtio-gpu -
GPU仮想化最前線 - KVMGTとvirtio-gpu -
zgock
 
UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動
uchan_nos
 
オススメの標準・準標準パッケージ20選
オススメの標準・準標準パッケージ20選オススメの標準・準標準パッケージ20選
オススメの標準・準標準パッケージ20選
Takuya Ueda
 
PythonとVeriloggenを用いたRTL設計メタプログラミング
PythonとVeriloggenを用いたRTL設計メタプログラミングPythonとVeriloggenを用いたRTL設計メタプログラミング
PythonとVeriloggenを用いたRTL設計メタプログラミング
Shinya Takamaeda-Y
 
「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」
「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」
「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」
直久 住川
 
Introduction to Initramfs - Initramfs-tools and Dracut
Introduction to Initramfs - Initramfs-tools and DracutIntroduction to Initramfs - Initramfs-tools and Dracut
Introduction to Initramfs - Initramfs-tools and Dracut
Taisuke Yamada
 
PythonとPyCoRAMでお手軽にFPGAシステムを開発してみよう
PythonとPyCoRAMでお手軽にFPGAシステムを開発してみようPythonとPyCoRAMでお手軽にFPGAシステムを開発してみよう
PythonとPyCoRAMでお手軽にFPGAシステムを開発してみよう
Shinya Takamaeda-Y
 
Unix v6 Internals
Unix v6 InternalsUnix v6 Internals
CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編
CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編
CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編
Fixstars Corporation
 
Address/Thread/Memory Sanitizer
Address/Thread/Memory SanitizerAddress/Thread/Memory Sanitizer
Address/Thread/Memory Sanitizer
Platonov Sergey
 
GPUが100倍速いという神話をぶち殺せたらいいな ver.2013
GPUが100倍速いという神話をぶち殺せたらいいな ver.2013GPUが100倍速いという神話をぶち殺せたらいいな ver.2013
GPUが100倍速いという神話をぶち殺せたらいいな ver.2013
Ryo Sakamoto
 

What's hot (20)

Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
ZynqMPのQEMU
ZynqMPのQEMUZynqMPのQEMU
ZynqMPのQEMU
 
用十分鐘 向jserv學習作業系統設計
用十分鐘  向jserv學習作業系統設計用十分鐘  向jserv學習作業系統設計
用十分鐘 向jserv學習作業系統設計
 
FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料
 
プログラムを高速化する話Ⅱ 〜GPGPU編〜
プログラムを高速化する話Ⅱ 〜GPGPU編〜プログラムを高速化する話Ⅱ 〜GPGPU編〜
プログラムを高速化する話Ⅱ 〜GPGPU編〜
 
Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)
Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)
Microsemi FPGAで RISC-V を動かしてみた話 (Lチカ)
 
レシピの作り方入門
レシピの作り方入門レシピの作り方入門
レシピの作り方入門
 
from Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Worksfrom Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Works
 
ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)
ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)
ZynqMPのブートとパワーマネージメント : (ZynqMP Boot and Power Management)
 
GPU仮想化最前線 - KVMGTとvirtio-gpu -
GPU仮想化最前線 - KVMGTとvirtio-gpu -GPU仮想化最前線 - KVMGTとvirtio-gpu -
GPU仮想化最前線 - KVMGTとvirtio-gpu -
 
UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動
 
オススメの標準・準標準パッケージ20選
オススメの標準・準標準パッケージ20選オススメの標準・準標準パッケージ20選
オススメの標準・準標準パッケージ20選
 
PythonとVeriloggenを用いたRTL設計メタプログラミング
PythonとVeriloggenを用いたRTL設計メタプログラミングPythonとVeriloggenを用いたRTL設計メタプログラミング
PythonとVeriloggenを用いたRTL設計メタプログラミング
 
「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」
「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」
「FPGA 開発入門:FPGA を用いたエッジ AI の高速化手法を学ぶ」
 
Introduction to Initramfs - Initramfs-tools and Dracut
Introduction to Initramfs - Initramfs-tools and DracutIntroduction to Initramfs - Initramfs-tools and Dracut
Introduction to Initramfs - Initramfs-tools and Dracut
 
PythonとPyCoRAMでお手軽にFPGAシステムを開発してみよう
PythonとPyCoRAMでお手軽にFPGAシステムを開発してみようPythonとPyCoRAMでお手軽にFPGAシステムを開発してみよう
PythonとPyCoRAMでお手軽にFPGAシステムを開発してみよう
 
Unix v6 Internals
Unix v6 InternalsUnix v6 Internals
Unix v6 Internals
 
CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編
CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編
CPU / GPU高速化セミナー!性能モデルの理論と実践:実践編
 
Address/Thread/Memory Sanitizer
Address/Thread/Memory SanitizerAddress/Thread/Memory Sanitizer
Address/Thread/Memory Sanitizer
 
GPUが100倍速いという神話をぶち殺せたらいいな ver.2013
GPUが100倍速いという神話をぶち殺せたらいいな ver.2013GPUが100倍速いという神話をぶち殺せたらいいな ver.2013
GPUが100倍速いという神話をぶち殺せたらいいな ver.2013
 

Similar to Share the Experience of Using Embedded Development Board

LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness
Peter Griffin
 
LAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel AwarenessLAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel Awareness
Linaro
 
Next Stop, Android
Next Stop, AndroidNext Stop, Android
Next Stop, Android
National Cheng Kung University
 
Tiny ML for spark Fun Edge
Tiny ML for spark Fun EdgeTiny ML for spark Fun Edge
Tiny ML for spark Fun Edge
艾鍗科技
 
ELC-E Linux Awareness
ELC-E Linux AwarenessELC-E Linux Awareness
ELC-E Linux Awareness
Peter Griffin
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
Slawomir Jasek
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Stm32 f4 first touch
Stm32 f4 first touchStm32 f4 first touch
Stm32 f4 first touch
Benux Wei
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDP
lcplcp1
 
Utft
UtftUtft
Utft
Joc LM
 
Crash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_TizenCrash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_Tizen
Lex Yu
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
Dobrica Pavlinušić
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
Anne Nicolas
 
Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102
Linaro
 
Challenges in GPU compilers
Challenges in GPU compilersChallenges in GPU compilers
Challenges in GPU compilers
AnastasiaStulova
 
AI Hardware Landscape 2021
AI Hardware Landscape 2021AI Hardware Landscape 2021
AI Hardware Landscape 2021
Grigory Sapunov
 
Not breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABINot breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABI
Alison Chaiken
 

Similar to Share the Experience of Using Embedded Development Board (20)

LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness
 
LAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel AwarenessLAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel Awareness
 
Next Stop, Android
Next Stop, AndroidNext Stop, Android
Next Stop, Android
 
Tiny ML for spark Fun Edge
Tiny ML for spark Fun EdgeTiny ML for spark Fun Edge
Tiny ML for spark Fun Edge
 
ELC-E Linux Awareness
ELC-E Linux AwarenessELC-E Linux Awareness
ELC-E Linux Awareness
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Stm32 f4 first touch
Stm32 f4 first touchStm32 f4 first touch
Stm32 f4 first touch
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDP
 
Utft
UtftUtft
Utft
 
Crash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_TizenCrash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_Tizen
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102
 
Challenges in GPU compilers
Challenges in GPU compilersChallenges in GPU compilers
Challenges in GPU compilers
 
AI Hardware Landscape 2021
AI Hardware Landscape 2021AI Hardware Landscape 2021
AI Hardware Landscape 2021
 
Not breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABINot breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABI
 

More from Jian-Hong Pan

國稅局,我也好想用電腦報稅
國稅局,我也好想用電腦報稅國稅局,我也好想用電腦報稅
國稅局,我也好想用電腦報稅
Jian-Hong Pan
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Jian-Hong Pan
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
Jian-Hong Pan
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry Pi
Jian-Hong Pan
 
Have a Simple Modbus Server
Have a Simple Modbus ServerHave a Simple Modbus Server
Have a Simple Modbus Server
Jian-Hong Pan
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
Jian-Hong Pan
 
Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!
Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!
Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!
Jian-Hong Pan
 
LoRaWAN class module and subsystem
LoRaWAN class module and subsystemLoRaWAN class module and subsystem
LoRaWAN class module and subsystem
Jian-Hong Pan
 
Let's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoT
Let's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoTLet's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoT
Let's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoT
Jian-Hong Pan
 
The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017
Jian-Hong Pan
 
Build a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded SystemBuild a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded System
Jian-Hong Pan
 
Micro HTTP Server Implemented in C @ COSCUP 2016
Micro HTTP Server Implemented in C @ COSCUP 2016Micro HTTP Server Implemented in C @ COSCUP 2016
Micro HTTP Server Implemented in C @ COSCUP 2016
Jian-Hong Pan
 
Bind Python and C @ COSCUP 2015
Bind Python and C @ COSCUP 2015Bind Python and C @ COSCUP 2015
Bind Python and C @ COSCUP 2015
Jian-Hong Pan
 
Find the bottleneck of your system
Find the bottleneck of your systemFind the bottleneck of your system
Find the bottleneck of your system
Jian-Hong Pan
 
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDevLearn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Jian-Hong Pan
 
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code MeetupDebug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Jian-Hong Pan
 
Make Your Own Developement Board @ 2014.4.21 JuluOSDev
Make Your Own Developement Board @ 2014.4.21 JuluOSDevMake Your Own Developement Board @ 2014.4.21 JuluOSDev
Make Your Own Developement Board @ 2014.4.21 JuluOSDev
Jian-Hong Pan
 
The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014
Jian-Hong Pan
 
Node.js 1, 2, 3
Node.js 1, 2, 3Node.js 1, 2, 3
Node.js 1, 2, 3
Jian-Hong Pan
 

More from Jian-Hong Pan (19)

國稅局,我也好想用電腦報稅
國稅局,我也好想用電腦報稅國稅局,我也好想用電腦報稅
國稅局,我也好想用電腦報稅
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry Pi
 
Have a Simple Modbus Server
Have a Simple Modbus ServerHave a Simple Modbus Server
Have a Simple Modbus Server
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!
Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!
Nasa Hackthon 2018 Light Wonder - Go! Polar Bear!
 
LoRaWAN class module and subsystem
LoRaWAN class module and subsystemLoRaWAN class module and subsystem
LoRaWAN class module and subsystem
 
Let's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoT
Let's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoTLet's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoT
Let's Have an IEEE 802.15.4 over LoRa Linux Device Driver for IoT
 
The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017
 
Build a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded SystemBuild a Micro HTTP Server for Embedded System
Build a Micro HTTP Server for Embedded System
 
Micro HTTP Server Implemented in C @ COSCUP 2016
Micro HTTP Server Implemented in C @ COSCUP 2016Micro HTTP Server Implemented in C @ COSCUP 2016
Micro HTTP Server Implemented in C @ COSCUP 2016
 
Bind Python and C @ COSCUP 2015
Bind Python and C @ COSCUP 2015Bind Python and C @ COSCUP 2015
Bind Python and C @ COSCUP 2015
 
Find the bottleneck of your system
Find the bottleneck of your systemFind the bottleneck of your system
Find the bottleneck of your system
 
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDevLearn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
 
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code MeetupDebug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
 
Make Your Own Developement Board @ 2014.4.21 JuluOSDev
Make Your Own Developement Board @ 2014.4.21 JuluOSDevMake Your Own Developement Board @ 2014.4.21 JuluOSDev
Make Your Own Developement Board @ 2014.4.21 JuluOSDev
 
The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014
 
Node.js 1, 2, 3
Node.js 1, 2, 3Node.js 1, 2, 3
Node.js 1, 2, 3
 

Recently uploaded

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 

Recently uploaded (20)

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 

Share the Experience of Using Embedded Development Board

  • 1. Share the Experience of Using Embedded Development Board 潘建宏 Jian-Hong Pan (StarNight) @ COSCUP 2023
  • 2. Who am I 潘建宏 / Jian-Hong Pan (StarNight) Endless OS Foundation You can find me at ● http://www.slideshare.net/chienhungpan/ ● GitHub: starnight ● Twitter: starnight_pan ● Email: jhp [AT] endlessos.org chienhung.pan [AT] gmail.com
  • 3. Background ● Due to the pandemic in the past few years, lacking chips has become one of the reasons that vendors cannot produce products. That affects industry, automotive and IT, etc. ● Many countries propose new policies/acts which start to investigate the source of products recently. Therefore, keeping the flexibility of the usage of parts to maintain the robustness of productivity and service is an important skill.
  • 4. Well-Known Chip Architectures Including MCU and CPU ● PIC ● x86(_64) ● ARM (8, 32 and 64 bits) ● AVR (8 and 32 bits) ● RISC-V (32, 64 bits and …) ● … and more
  • 5. Development Environment Common GCC, GDB, make … or known as toolchain Embedded system OpenOCD, JTAG, USB to serial (option) and Board Support Package (BSP) Cross Compiler {arch}-{project …}-{gcc, gdb, ld, objcopy, objdump …} Host (x86_64) Cross compile source code Target (ARM, RISC-V) Executable binary
  • 6. Examples Microcontroller Unit (MCU) Level ● Cortex-M4: Nuvoton’s NuTiny-SDK-NUC472 ● RISC-V (32 bits): Sipeed Longan Nano Central Processor Unit (CPU) Level ● Cortex-A72: Raspberry Pi 4B ● RISC-V (64 bits): QEMU Virtual Machine
  • 7. Start from MCU Level First
  • 8. ARM Cortex-M Comparison Arm Core Cortex-M0 … Cortex-M4 … Cortex-M23 … ARM architecture ARMv6-M ARMv7E-M ARMv8-M Baseline Instruction pipeline 3 stages 3 stages 2 stages Multiply instructions 32x32 = 32-bit result Yes Multiply instructions 32x32 = 64-bit result No Yes No Divide instructions 32/32 = 32-bit quotient No Yes DSP instructions No Yes NO TrustZone security instructions No No Optional Reference: Table: ARM Cortex-M instruction variations of ARM Cortex-M
  • 9. NuTiny-SDK-NUC472’s Dev Environment My host is an Arch Linux (x86_64) system. The target chip is Nuvoton's NUC472HI8AE, an ARM Cortex-M4 MCU. Therefore, install the “arm-none-eabi-” toolchain packages: ● arm-none-eabi-binutils ● arm-none-eabi-gcc ● arm-none-eabi-newlib ● arm-none-eabi-gdb I prefer the Makefile tool. So, make is installed, too. Note: Nuvoton marks NUC472HI8AE as Not Recommended For New Designs (NRND) now. Recommended Part Number: M487 Ethernet Series
  • 10. NuTiny-SDK-NUC472 Dev Environment (cont.) Also, need OpenOCD to flash and debug. ● Upstream OpenOCD must includes these commits at least: ○ flash/nor/numicro: reorder the parts list ○ flash: support Nuvoton M541 & NUC442/472 series ○ tcl: add a configuration file for Nuvoton M541 & NUC442/472 series The commits have been merged into the master branch. ● Or, downstream Nuvoton OpenOCD I use this one
  • 12. NUC472-NuTiny’s LED Sample as the Example Nuvoton has provided the NUC472/442 BSP at https://github.com/OpenNuvoton/NUC472_442BSP, which follows Common Microcontroller Software Interface Standard (CMSIS). $ git clone https://github.com/OpenNuvoton/NUC472_442BSP $ cd NUC472_442BSP/SampleCode/NUC472-NuTiny/LED/ And, have to add a Makefile into the LED sample code directory, for compile, clean and flash.
  • 13. CMSIS, Standard and Device Libraries for the Makefile NUC472/442 BSP provides the libraries: ● CMSIS library is under path Library/CMSIS. ● Standard library is under path Library/StdDriver. ● NUC472/442’s library is under path Library/Device/Nuvoton/NUC472_442. ● NUC472/442’s system clock initialization is at Library/Device/Nuvoton/NUC472_442/Source/system_NUC472_442.c. ● NUC472/442’s startup file is at Library/Device/Nuvoton/NUC472_442/Source/GCC/startup_NUC472_442.S. ● NUC472/442’s linker file is at Library/Device/Nuvoton/NUC472_442/Source/GCC/gcc_arm.ld.
  • 14. Build the LED Application with make $ make arm-none-eabi-gcc -I../../../../NUC472_442BSP/Library/CMSIS/Include -I../../../../NUC472_442BSP/Library/StdDriver/inc -I../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Include -I. -ggdb -Os -Wall -Wextra -Warray-bounds -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/GCC/gcc_arm.ld main.c ../../../../NUC472_442BSP/Library/StdDriver/src/clk.c ../../../../NUC472_442BSP/Library/StdDriver/src/gpio.c ../../../../NUC472_442BSP/Library/StdDriver/src/sys.c ../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/system_NUC472_442.c ../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/GCC/startup_NUC472_442.S -o LED.elf ... arm-none-eabi-objcopy -O ihex LED.elf LED.hex arm-none-eabi-objcopy -O binary LED.elf LED.bin
  • 15. Flash the built image into NuTiny-SDK-NUC472 Connect the NuTiny-SDK-NUC472 to your host via the USB cable. And, flash: $ make flash # May need root privilege for opening Nu-Link device openocd -f "interface/nulink.cfg" -f "target/numicro_m4.cfg" -c "program LED.elf verify reset exit" … ** Programming Started ** Info : Device ID: 0x00047201 Info : Device Name: NUC472HI8AE Info : bank base = 0x00000000, size = 0x00080000 Warn : Adding extra erase range, 0x00001770 .. 0x000017ff Info : Nuvoton NuMicro: Sector Erase ... (0 to 2) Info : Nuvoton NuMicro: Flash Write ... ** Programming Finished ** ** Verify Started ** ** Verified OK ** ** Resetting Target ** shutdown command invoked After flash, the onboard LED should become blinking.
  • 16. Flash & Debug with GDB via OpenOCD and Nu-Link Host OpenOCD Built Binary Target Machine NuTiny-EVB-NUC472 Nu-Link-Me as the JTAG
  • 17. 1. Start the gdb server with Nu-Link and the numicro M4 configs: $ openocd -f "interface/nulink.cfg" -f "target/numicro_m4.cfg" … hla_swd Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 1000 kHz Info : Nu-Link firmware_version 6535, product_id (0x00012009) Info : Adapter is Nu-Link Info : IDCODE: 0x2BA01477 Info : [NuMicro.cpu] Cortex-M4 r0p1 processor detected Info : [NuMicro.cpu] target has 6 breakpoints, 4 watchpoints Info : starting gdb server for NuMicro.cpu on 3333 Info : Listening on port 3333 for gdb connections [NuMicro.cpu] halted due to breakpoint, current mode: Thread xPSR: 0x01000000 pc: 0x00000f5c msp: 0x20010000
  • 18. 2. Have the gdb client connecting to the gdb server listening on port 3333 to debug the LED.elf flashed on the MCU chip Nuvoton NUC472HI8AE: $ arm-none-eabi-gdb LED.elf ... Reading symbols from LED.elf... (gdb) target remote localhost:3333 Remote debugging using localhost:3333 warning: Overlapping regions in memory map: ignoring Reset_Handler () at ../../../../NUC472_442BSP/Library/Device/Nuvoton/NUC472_442/Source/GCC/startup_NUC472_442.S:268 268 ldr r1, =__etext (gdb) hbreak main.c:86 Hardware assisted breakpoint 1 at 0x3a2: file main.c, line 86. (gdb) continue Continuing. Breakpoint 1, main () at main.c:86 86 PB10 = 0; (gdb) Use hbreak (hardware-assisted breakpoint) to add a break point, instead of break. Reference: 5.1.1 Setting Breakpoints
  • 19. RISC-V Capability, RISC-V@Andes as the Example AndeStar™ V5 Architecture: ● Supports both 32-bits (RV32) and 64-bits (RV64) ● 32-bit N25, N25F, D25F, A25 and A27; 64-bit NX25, NX25F, AX25, and AX27 ● N25F, NX25F, A25 and AX25 supports single and double precision floating point for high-precision data computations ● D25F, A25 and AX25 supports DSP/SIMD instructions Reference: RISC-V@Andes
  • 20. Sipeed Longan Nano's Dev Environment According to Longan Nano’s introduction, the target chip is a GD32VF103 MCU using Andes’ core with RISC-V 32 bits ISA. Therefore, install the “riscv64-elf-” toolchain packages: ● riscv64-elf-binutils ● riscv64-elf-gcc ● riscv64-elf-newlib ● riscv64-elf-gdb The make is a preferred tool and need OpenOCD to flash and debug.
  • 21. List riscv64-elf- Toolchain Supported Architectures $ riscv64-elf-gcc --version | head -n1 riscv64-elf-gcc (Arch Linux Repositories) 12.2.0 $ riscv64-elf-gcc --print-multi-lib .; rv32i/ilp32;@march=rv32i@mabi=ilp32 rv32im/ilp32;@march=rv32im@mabi=ilp32 rv32iac/ilp32;@march=rv32iac@mabi=ilp32 rv32imac/ilp32;@march=rv32imac@mabi=ilp32 rv32imafc/ilp32f;@march=rv32imafc@mabi=ilp32f rv64imac/lp64;@march=rv64imac@mabi=lp64 rv64imafdc/lp64d;@march=rv64imafdc@mabi=lp64d
  • 22. Tweak Longan Nano’s BSP GD32VF103 Microcontroller has GD32VF103_Firmware_Library. However, it suggests Nuclei SDK!? $ git clone https://github.com/Nuclei-Software/nuclei-sdk $ cd nuclei-sdk I have some modification to use the bare-metal toolchain “riscv64-elf-”: ● Use common RISC-V 64 bare-metal toolchain ● Set ISA spec version as 2.2 to support extension zicsr ● Use mainline OpenOCD’s gd32vf103.cfg as the config. Besides, I use FTDI FT232HQ board as the the JTAG interface. So, use um232h.cfg as the config.
  • 23. Have an LED Application as the Example Add the LED application referring to sibling helloworld: $ ls application/baremetal/led/ main.c Makefile npk.yml 1. Get into the led app: $ cd application/baremetal/led 2. Disable the optimization for GDB with -O0. 3. Build: $ make SOC=gd32vf103 BOARD=gd32vf103c_longan_nano all 4. Flash: $ make SOC=gd32vf103 BOARD=gd32vf103c_longan_nano upload 5. It will light RGB LEDs in order periodically.
  • 24. Flash & Debug with GDB via OpenOCD and FTDI Host OpenOCD Built Binary Target Machine Sipeed Longan Nano FTDI FT232H as the JTAG
  • 25. JTAG interface Reference: Longan Documentation -> PIN Map & Longan-DOC with Apache License Version 2.0
  • 26. 1. Connect the TCK, TDO, TDI, TMS and GND pins between FT232H and the Sipeed Longan Nano board. 2. Start the gdb server with FT232H as JTAG interface and GD32VF103 as the target configs: $ openocd -f interface/ftdi/um232h.cfg -f target/gd32vf103.cfg … Warn : An adapter speed is not selected in the init scripts. OpenOCD will try to run the adapter at the low speed (100 kHz) Warn : To remove this warnings and achieve reasonable communication speed with the target, set "adapter speed" or "jtag_rclk" in the init scripts. Info : clock speed 100 kHz Info : JTAG tap: gd32vf103.cpu tap/device found: 0x1000563d (mfg: 0x31e (Andes Technology Corporation), part: 0x0005, ver: 0x1) Info : JTAG tap: auto0.tap tap/device found: 0x790007a3 (mfg: 0x3d1 (GigaDevice Semiconductor (Beijing) Inc), part: 0x9000, ver: 0x7) Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 5 -expected-id 0x790007a3" Info : datacount=4 progbufsize=2 Info : Examined RISC-V core; found 1 harts Info : hart 0: XLEN=32, misa=0x40901105 Info : starting gdb server for gd32vf103.cpu on 3333 Info : Listening on port 3333 for gdb connections
  • 27. 3. Have the gdb client connecting to the gdb server to debug the led.elf flashed on the MCU chip GD32VF103C8T6: $ riscv64-elf-gdb led.elf ... Reading symbols from led.elf... (gdb) target extended-remote localhost:3333 Remote debugging using localhost:3333 0x080016ee in SysTimer_GetLoadValue () at ../../../NMSIS/Core/Include/core_feature_timer.h:151 151 if (high0 != high) { (gdb) break main.c:68 Breakpoint 1 at 0x8001d9c: file main.c, line 68. Note: automatically using hardware breakpoints for read-only addresses. (gdb) continue Continuing. Breakpoint 1, main () at main.c:68 68 gpio_bit_reset(GPIOC, GPIO_PIN_13); (gdb)
  • 28. How about CPU Level Boot Linux System
  • 30. Build Linux Kernel with arm64 Arch The cross compilation toolchain’s prefix is “aarch64-linux-gnu-”. Use aarch64-linux-gnu-gcc as the compiler. 1. Get Linux kernel $ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git 2. Build $ cd linux $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
  • 31. Have a Blank Disk to Boot QEMU VM $ fdisk -l blank.img Disk blank.img: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xf80638ed Device Boot Start End Sectors Size Id Type blank.img1 * 1 2049 2049 1M b W95 FAT32 blank.img2 2050 8191 6142 3M 83 Linux Just a quick test!
  • 32. Boot the QEMU VM with Linux Kernel & Blank Disk Install packages: qemu-system-aarch64 $ qemu-system-aarch64 -smp 2 -M virt -cpu cortex-a57 -m 1G -kernel ~/linux/arch/arm64/boot/Image --append "console=ttyAMA0 root=/dev/vda2" -hda ~/qemuimg/blank.img -serial stdio
  • 33. Linux Kernel Tries to Find init in the Filesystem … [ 2.146201] Run /sbin/init as init process [ 2.148061] Run /etc/init as init process [ 2.149846] Run /bin/init as init process [ 2.150521] Run /bin/sh as init process [ 2.151871] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. …
  • 34. The Init Process In Unix-based computer operating systems, init (short for initialization) is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. ~ from init on Wiki ● SysVInit ● Upstart ● Systemd ● OpenRC ● … ● Busybox $ ls -l /bin/init # on my laptop lrwxrwxrwx 1 root root 22 Jun 20 05:41 /bin/init -> ../lib/systemd/systemd
  • 35. System Storage Layout Boot Partition: ● Boot loader ● Kernel, Initial RAM disk, Device Tree Blobs Root Partition: ● /boot ● /sbin, /bin ● /usr, /lib ● /etc ● /dev, /proc, /sys ● /root ● /tmp, /var, /mnt ● … init
  • 36. Build a System Image Containing Root Filesystem 1. Have a raw image 2. Format the raw image with designed partitions layout 3. Mount the root partition to the QEMU VM by the architecture 4. Install system packages, applications into the root partition. Also, known as bootstrap. 5. Prepare config files for the init process into the root partition 6. Prepare /etc/fstab for mount points 7. Prepare config files for other processes into the root partition: Network, DHCP, DNS … 8. Unmount the root partition Note: Step 5 ~ 7 depend on the hardware and case by case.
  • 37. Build System Images with GitHub Actions Build kernel: https://github.com/starnight/build-kernel/blob/main/.github/workflows/main.yml Build system image with Alpine container images: https://github.com/starnight/build-image/blob/main/.github/workflows/image.yml 1. Build root filesystem within the architecture’s container environment, for example aarch64 2. Create a RAW image and partitions 3. Mount the partitions and deploy the root filesystem into the partitions
  • 39. Boot with the Built Image on Raspberry Pi Welcome to Alpine Linux 3.18 Kernel 6.4.2 on an aarch64 (/dev/ttyS1) alpine-arm64 login: root Welcome to Alpine! … alpine-arm64:~# dmesg [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083] [ 0.000000] Linux version 6.4.2 (runner@fv-az470-332) (aarch64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP PREEMPT Sat Jul 8 04:19:40 UTC 2023 [ 0.000000] random: crng init done [ 0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.1 [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000037400000, size 64 MiB …
  • 40. Please Refer for More Detail ● Debug Linux Kernel on Raspberry Pi: Let's trace Linux Kernel with KGDB ● Build Root Filesystem for Raspberry Pi: Launch the First Process in Linux System
  • 41. Build Linux Kernel with RISC-V 64 Bits Arch The cross compilation toolchain’s prefix is “riscv64-linux-gnu-”. Use riscv64-linux-gnu-gcc as the compiler. 1. Get Linux kernel $ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git 2. Build $ cd linux $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- menuconfig $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-
  • 42. Boot the kernel with Root Filesystem on QEMU VM Install packages: qemu-system-riscv and qemu-system-riscv-firmware The root filesystem can be downloaded from starnight/build-image’s Releases. $ qemu-system-riscv64 -M virt -smp 4 -m 2G -display none -serial stdio -kernel ~/linux/arch/riscv/boot/Image -append "console=ttyS0 root=/dev/vda2 rw rootfstype=ext4" -drive file=/tmp/simple-alpine-qemu_riscv64.img,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=usernet -device virtio-net-device,netdev=usernet
  • 43. Tune the Build Config to Debug RISC-V QEMU VM ● The option CONFIG_SOC_VIRT is for QEMU virtual machine. ● For debug ○ CONFIG_DEBUG_INFO=y ○ # CONFIG_DEBUG_INFO_REDUCED is not set ○ CONFIG_GDB_SCRIPTS=y ○ CONFIG_FRAME_POINTER=y
  • 44. Boot with the Built Image on QEMU VM (RISC-V 64) Welcome to Alpine Linux 3.18 Kernel 6.4.2 on an riscv64 (/dev/ttyS0) alpine-arm64 login: root Welcome to Alpine! … alpine-arm64:~# dmesg [ 0.000000] Linux version 6.4.2 (zack@starnight) (riscv64-linux-gnu-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39) #3 SMP Sun Jul 9 11:30:02 CST 2023 [ 0.000000] random: crng init done [ 0.000000] Machine model: riscv-virtio,qemu [ 0.000000] efi: UEFI not found. [ 0.000000] OF: reserved mem: 0x0000000080000000..0x000000008003ffff (256 KiB) map non-reusable mmode_resv0@80000000 …
  • 45. Boot the RISC-V 64 System for Online Debug Append -S and -s to QEMU command: $ qemu-system-riscv64 -h ... -S freeze CPU at startup (use 'c' to start execution) … -gdb dev accept gdb connection on 'dev'. (QEMU defaults to starting the guest without waiting for gdb to connect; use -S too if you want it to not start execution.) -s shorthand for -gdb tcp::1234
  • 46. 1. Boot the QEMU virtual machine with debug feature $ qemu-system-riscv64 -M virt -smp 4 -m 2G -display none -serial stdio -kernel ~/linux/arch/riscv/boot/Image -append "console=ttyS0 root=/dev/vda2 rw rootfstype=ext4" -drive file=/tmp/simple-alpine-qemu_riscv64.img,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=usernet -device virtio-net-device,netdev=usernet -s -S Note: It freezes CPU at startup
  • 47. 2. Install riscv64-linux-gnu-gdb as the debugger 3. Start RISC-V 64’s GDB in the linux project folder, then debug: $ cd ~/linux-stable && riscv64-linux-gnu-gdb vmlinux ... Reading symbols from vmlinux... (gdb) target remote localhost:1234 Remote debugging using localhost:1234 0x0000000000001000 in ?? () (gdb) break virtnet_probe Breakpoint 1 at 0xffffffff806b87dc: file drivers/net/virtio_net.c, line 3879. (gdb) continue Continuing. [Switching to Thread 1.2] Thread 2 hit Breakpoint 1, virtnet_probe (vdev=0xff60000001e6b040) at drivers/net/virtio_net.c:3879 3879 { (gdb)
  • 48. Reference ● QEMU ARM guest support ● First Kernel Patch ● Linux Documentation/admin-guide/init.rst ● fdisk, mkfs.vfat, mkfs.ext4 and mount ● Alpine ● The Linux Bootdisk HOWTO - 4. Building a root filesystem ● Bootstrapping Alpine Linux ● RISC-V Specifications
  • 49.
  • 50. APPENDIX - AVR’s Development Environment AVR series MCUs are used widely on Arduino classic boards. Therefore, install the “avr-” toolchain packages: ● avr-gcc ● avr-gdb ● avr-libc And, the flash tool: avrdude Prepared some examples in AVR practice repository. https://github.com/starnight/AVR-practice