Hardware Enablement

A free toolchain for 0.01 € - computers

The free toolchain for the Padauk 8-bit microcontrollers
K.4.401
Philipp Klaus Krause
The Taiwanese company Padauk makes small 8-bit microcontrollers, the smallest of which are available at 0.01 € even in small quantities. Even the larger ones are just a few cents; a particularly interestign feature is the hardware multithreading support available in larger devices. Until recently, the only available toolchain was Padauk's non-free toolchain based around their "MINI-C" IDE (which despite, the name, ist just a bit of C-like syntactic sugar coating for assembler, and in no way a C implementation). In 2019, an effort to provide a free alternative resulted in a full free toolchain. Documentation beyond that provided by Padauk was created by reverse-engineering. A free design for a programmer along with firmware was created. Assembler, simulator and a Small Device C Compiler (SDCC) backend were written.
The Padauk microcontrollers (µC) are small 8-bit Systems-on-a-Chip (SoC). Their program memory (PROM or Flash) is 0.5 KW to 4 KW with word sizes from 13 to 16 bit. Their data memory is 60 B to 256 B with 8-bit Bytes. The µC only have few peripherals; however, some of the larger devices are barrel processors with support for up to 8 hardware threads. This allows the emulation of even timing-critical peripherals in software. Padauk also supplies a programmer and a non-free "MINI-C" IDE. There is a lack of documentation when it comes to aspects not needed for users of MINI-C. In particular, there is no documentation of opcodes and very little information on the programming protocol. There are 4 subarchitectures, which we name by the word size in the program memory pdk13, pdk14, pdk15 and pdk16. There is some variation in the form of optional instructions within the subarchitectures. In 2019, a full free toolchain for these µC was created. The necessary documentation was reverse-engineered. A free programmer design and firmware was created. For the pdk13, pdk14 and pdk15, we wrote free assemblers and simulators. We also wrote an SDCC backend for these. SDCC is a free C compiler that emphasizes standard-compliance and generating efficient code for small devices; while not up to the level of GCC and LLVM it tends to hold up well against many non-free compilers targetting small devices (see e.g. the FOSDEM 2018 talk "The free toolchain for the STM8"). While stack handling on the Padauk µC is much better than on e.g. small Mirochip PIC devices, it is still not efficient (in particular, there is no stack-pointer-relative addressing mode). Thus SDCC does not place local variables on the stack by default, which makes functions non-reentrant and is not standard-compliant, but a common choice in such cases (see e.g. the mcs51 backend in SDCC or Keil for MCS-51). However, this approach does not work well for devices with hardware-multithreading (i.e. few pdk14 and all pdk16).

Additional information

Type devroom

More sessions

2/2/20
Hardware Enablement
Fabien Chouteau
K.4.401
For embedded developers using alternative programming languages, but also for anyone using third party driver frameworks such as libopencm3, one of the main pain points to start using a microcontroller is to make a Board Support Package. Things like linker script or startup code (crt0) not only require skills, but also information that are not always easily accessible. In this talk we will present a tool that generates linker script, startup code, and low level hardware binding for 3000 ARM ...
2/2/20
Hardware Enablement
Anton Kuzmin
K.4.401
An approach to challenges of an on-FPGA debugging of IP cores based on free software tools is demonstrated. Various aspects and related problems of an on-hardware debugging are presented along with the tools to address them, such as OpenOCD, sigrok/PulseView, GHDL, etc. Real-life working configuration and missing bits of software are accompanied by the live debug session demo running on Open-source Hardware.
2/2/20
Hardware Enablement
Mario Behling
K.4.401
While it is standard to deploy every single code commit using CI systems and deploy new code automatically we are only at the beginning of automation for designing hardware. In this talk I will share the experience with continuous integration tools in FOSSASIA hardware projects, and specifically our Pocket Science Lab. I will outline opportunities and challenges for implementing CI processes for hardware.
2/2/20
Hardware Enablement
K.4.401
We talked extensively about LinuxBoot, a Linux-based environment intended to be integrated into the firmware on the boot ROM. This time we want to talk about how do we test LinuxBoot before it goes to production. We will talk about ConTest, an open-source continuous and on-demand system testing framework that we designed to be modular, validating, and infrastructure-agnostic, and how it is helping us validate open source firmware on our datacenter platforms.
2/2/20
Hardware Enablement
Drew Fustini
K.4.401
Want to run Linux with RISC-V on Open Source Hardware? This talk will explore the current options including how open source FPGA tools can be leveraged to build open Linux-capable systems.
2/2/20
Hardware Enablement
Michał Żygowski
K.4.401
The presentation is about AMD's involvement in coreboot evolution and development. Gives a high-level overview of the engagement of the silicon vendor in the coreboot project history. The presentation may contain a little bit of technical aspects of firmware and BIOS. However, the intended audience is not only firmware and BIOS developers, but also free and libre hardware enthusiasts too. If anybody is interested in the future of famous platforms like Asus KGPE-D16, Lenovo G505S, PC Engines ...
2/2/20
Hardware Enablement
Tsvetan Usunov
K.4.401
Olimex is designing Open Source Hardware Linux computers since 2012. They are adopted by hundreds of manufacturers all around the world and prove the Open Source business model is sustainable. The lecture is about the advantages which OSHW bring to the industrial vendors and what drives their decision to use our boards. We will explain the benefits for the SOC vendors to have OSHW designs with their ICs, the end user benefits and how OSHW helps us to excel our products and make them better and ...