a free toolchain for 0 01 computers
play

A free toolchain for 0.01 - computers The free toolchain for the - PowerPoint PPT Presentation

A free toolchain for 0.01 - computers The free toolchain for the Padauk 8-bit microcontrollers Philipp Klaus Krause February 2, 2020 Table of Contents 1 The Padauk C 2 Free Hardware 3 Small Device C Compiler 4 TODO Table of Contents 1 The


  1. A free toolchain for 0.01 € - computers The free toolchain for the Padauk 8-bit microcontrollers Philipp Klaus Krause February 2, 2020

  2. Table of Contents 1 The Padauk µC 2 Free Hardware 3 Small Device C Compiler 4 TODO

  3. Table of Contents 1 The Padauk µC 2 Free Hardware 3 Small Device C Compiler 4 TODO

  4. Padauk µC Taiwanese manufacturer (rebrand reseller: Puolop) Cheap (down to 0,01 €) Low power Accumulator-based architecture Relatively nice architecture (similar to MCS-51) 60 B to 256 B RAM 0.5 KW to 4 KW program memory (PROM or Flash) Few peripherals (only timer, comparator, ADC, PWM, watchdog) 1 to 8 “Cores” (hardware threads)

  5. Subarchitectures 5 data addr. bits 6 7 8 9 I/O addr. bits 6 12 7 6 hardware threads 1 1 or 2 1 13 11 subarchitecture SYM_85A pdk13 pdk14 pdk15 pdk16 internal name SYM_84B SYM_86B 10 SYM_83A prog. mem. width 13 14 15 16 prog. addr. bits 2, 4 or 8

  6. Hardware Threads Barrel processor Per-thread state: accumulator, stack pointer, program counter, fmag register “Core”, “processing unit”, “FPP”, “FPPA” Lack of instruction support

  7. PMC234 Die

  8. Non-free Tools Mini-C: IDE integrated with compiler/assembler/software for writer/emulator. Assembly with a bit of C-like syntactic sugar. Program writer In-circuit emulator

  9. Free Tools Small Device C compiler (SDCC) with assembler, linker, simulator Easy PDK programmer with fjrm- and software development boards

  10. Table of Contents 1 The Padauk µC 2 Free Hardware 3 Small Device C Compiler 4 TODO

  11. Easy PDK programmer Simple hardware usable with various OSes Fully cupports 6 Padauk-µC so far (PMS15A, PMS150C, PMS154B, PMS154C, PFS154, PFS173) For 12 few more, there already is read-only support https://github.com/free-pdk

  12. Development Boards Minimal boards 4 LED Power supply via programmer, pins oder USB https://github.com/free-pdk/f-eval-boards

  13. Table of Contents 1 The Padauk µC 2 Free Hardware 3 Small Device C Compiler 4 TODO

  14. What is SDCC? C compiler (ANSI C89, ISO C99, ISO C11, ISO C2X) Freestanding implementation or part of a hosted implementation Supporting tools (assembler, linker, simulator, ...) Works on many host systems (GNU/Linux, Windows, macOS, Hurd, OpenBSD, FreeBSD, ...) Targets various 8-bit architectures (MCS-51, DS80C390, Z80, Z180, eZ80 in Z80 mode, Rabbit 2000, Rabbit 3000A, LR35902, TLCS-90, HC08, S08, STM8, pdk14, pdk15, pdk13, PIC14, PIC16) Has some unusual optimizations that make sense for these targets (in particular in register allocation) http://sdcc.sourceforge.net

  15. SDCC for Padauk Supports pdk13, pdk14, pdk15 Functions are non-reentrant by default (local variables at fjxed locations instead of on stack) via --stack-auto whole translation units can be compiled as reentrant; this comes at a signifjcant code size and runtime cost (e.g. 16-bit addition: 34 inst / 40 cycles vs. 6 inst / 6 cycles) Access to I/O-registers via __sfr and __sfr16 Via __reentrant individual functions can be made reentrant,

  16. Code size benefjts of pdk15 improvements 1 0.9 0.8 0.7 Relative code size 0.6 0.5 0.4 0.3 0.2 spadd idxsp spadd+idxsp 0.1 sprel spadd+sprel 0 dhrystone coremark stdcbench

  17. Code size benefjts of pdk15 improvements - all reentrant 1 0.9 0.8 0.7 Relative code size 0.6 0.5 0.4 0.3 0.2 spadd idxsp spadd+idxsp 0.1 sprel spadd+sprel 0 dhrystone coremark stdcbench

  18. Optimal Register Allocation in Polynomial Time Register allocator based on graph-structure theory Optimal register allocation in polynomial time Flexible through use of cost function Provides substantial improvements in code quality Slow compilation for targets with many registers Compilation speed / code quality trade-ofg: –max-allocs-per-node

  19. Regression testing Regression testing of nightly snapshots Tests mostly from fjxed bugs and from GCC Targets architectures: MCS-51, DS390, Z80, Z180, eZ80 in Z80 mode, Rabbit 2000, Rabbit 3000A, LR35902, TLCS-90, HC08, S08, STM8, pdk14, pdk15 Host OS: GNU/Linux, macOS, “Windows” (cross-compiled on GNU/Linux, tested via wine) Host architectures: x86, amd64, ppc, arm ≈ 12000 tests compiled and executed on simulators

  20. LLVM+SDCC Uses LLVM C front- and backend to produce C code to be compiled with SDCC Code compiled with LLVM+SDCC can be mixed with C code compiled with SDCC Allows languages other than C Enables high-level optimizations Experimental, many issues remaining

  21. Table of Contents 1 The Padauk µC 2 Free Hardware 3 Small Device C Compiler 4 TODO

  22. TODO SDCC needs developers Fix SDCC bugs Improve SDCC further in standard compliance, optimizations, debug info, etc Make LLVM+SDCC useable Improve IDE integration Add support for more devices in Easy PDK programmer

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend