From 29e0cc3b8e7691897ccd366af798b037647ae677 Mon Sep 17 00:00:00 2001 From: Penguin Date: Sun, 21 Nov 2021 15:35:32 -0600 Subject: [PATCH 1/5] updated readme instructions --- README.md | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 74097e4c..97930e5c 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,104 @@ Warning: This only works for x86\_64 linux machines atm. Windows development is As of right now, only the *new* command works. Everything else is not implemented yet. However, *new* does most of the heavy lifting so the other commands will come quickly once it is finished and polished. +### Prerequisites + +You need the following things installed for igloo+eSF to work properly: + - openocd + - rust (nightly preferred becuase it's just better) + - toolchains (more below) + +In the future, these things will just be bundled with eSF. The problem with some toolchains is dependency matching for various distros. + +#### Toolchains + +Loose naming convention for toolchains: +---- + + - arm-none-eabi: + - Toolchain targetting the embedded ABI for arm + - Debian/Ubuntu: + ``` + sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb-arm-none-eabi + ``` + + - Arch + ``` + sudo pacman -S arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-newlib + ``` + + **NOTE:** If you run into an issue when running arm-none-eabi-gdb where it needs libncurses.so.5 on Ubuntu/Debian, install this package: + ``` + sudo apt-get install libncurses5 + ``` + + - avr-* + ``` + Debian: + (To be added) + + Arch: + sudo pacman -S avr-binutils avr-gcc avr-gdb avr-libc avrdude + ``` + +#### OpenOCD + +It is recommended that you download the zip here: +https://github.com/xpack-dev-tools/openocd-xpack/releases + +Otherwise, you can install it from your package manager: + +Arch +``` +sudo pacman -S openocd +``` + +Debian/Ubuntu +``` +sudo apt install openocd +``` + + +#### Rustlang + +Doesn't get any easier than this: https://www.rust-lang.org/tools/install + ### Instructions for testing + +**WARNING**: DO NOT COPY AND PASTE THESE INSTRUCTIONS. READ THROUGH THEM. + ``` cd ~ + +# NOTE: If you plan on using the toolchain packaged with ESF, which may or may not work right now, clone recursively: +git clone --recursive https://git.epenguin.net/ePenguin/ePenguin-Software-Framework.git +# Otherwise git clone https://git.epenguin.net/ePenguin/ePenguin-Software-Framework.git + git clone https://git.epenguin.net/ePenguin/ePenguin-Igloo.git sudo chmod -R u+x ~/ePenguin-Software-Framework/ sudo chmod -R u+x ~/ePenguin-Igloo/ export ESF_DIR=~/ePenguin-Software-Framework -alias igloo=~/ePenguin-Igloo/target/release/igloo +alias igloo_rls=~/ePenguin-Igloo/target/release/igloo +alias igloo_dbg=~/ePenguin-Igloo/target/debug/igloo +alias igloo=igloo_dbg + +# Building +cd ~/ePenguin-Igloo + +# Debug build is default +cargo build + +# For release build +# cargo build --release + igloo ``` + You should see a help menu thrown at you for more instruction. +I've aliased igloo_dbg for igloo, but you can use the release version if you want better performance and faster compile times. It is highly recommended to use the debug version right now, though. + ### Generating a new project ``` igloo new --target= @@ -35,7 +120,7 @@ make ### Instructions for running I'm not including these steps because openocd releases vary with target configs. I recommend you download a release from https://openocd.org and unzip it there. Downloading via a package manager almost guarantees you're going to be missing target scripts. -In the future, igloo will handle all of this. +At some point in the future, I'm going to fork openocd just so I can make sure default board config scripts are 100% available because right now it's really hit or miss on various distros. for the e54 xplained ``` @@ -51,7 +136,7 @@ If the E54 xplained cfg isn't found for some reason, try this: ``` echo " # -# Atmel SAMD21 Xplained Pro evaluation kit. +# Atmel SAME54 Xplained Pro evaluation kit. # source [find interface/cmsis-dap.cfg] From 7764249c116f4faf9fcb83b048c7e136fb638d0e Mon Sep 17 00:00:00 2001 From: Penguin Date: Sun, 21 Nov 2021 15:36:51 -0600 Subject: [PATCH 2/5] formatting --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 97930e5c..b5fb1010 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,16 @@ Loose naming convention for toolchains: ---- - arm-none-eabi: - - Toolchain targetting the embedded ABI for arm - - Debian/Ubuntu: - ``` - sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb-arm-none-eabi - ``` - - - Arch - ``` - sudo pacman -S arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-newlib - ``` + - Toolchain targetting the embedded ABI for arm + - Debian/Ubuntu: + ``` + sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb-arm-none-eabi + ``` + + - Arch + ``` + sudo pacman -S arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-newlib + ``` **NOTE:** If you run into an issue when running arm-none-eabi-gdb where it needs libncurses.so.5 on Ubuntu/Debian, install this package: ``` From ea0c18f1ef8441eade3c27d54b8b9bf8478f2486 Mon Sep 17 00:00:00 2001 From: Penguin Date: Sun, 21 Nov 2021 15:49:06 -0600 Subject: [PATCH 3/5] adding documentation --- .gdb_history | 1 + README.md | 65 +++++++++++++++++++++++++++++++++++++--------------- env.sh | 2 ++ 3 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 .gdb_history create mode 100644 env.sh diff --git a/.gdb_history b/.gdb_history new file mode 100644 index 00000000..bca70f35 --- /dev/null +++ b/.gdb_history @@ -0,0 +1 @@ +q diff --git a/README.md b/README.md index b5fb1010..056b634c 100644 --- a/README.md +++ b/README.md @@ -174,21 +174,50 @@ The framework allows me to add support for mcus pretty rapidly. I can add entire | :question: | Experimental | | :white_check_mark: | Stable | -#### Arm - -| MCU | Status | -| :--- | ---: | -| samd21e15a | --- | -| samd21e16a | --- | -| samd21e17a | --- | -| samd21e18a | --- | -| samd21g15a | --- | -| samd21g16a | --- | -| samd21g17a | --- | -| samd21g17au | --- | -| samd21g18a | --- | -| samd21g18au | --- | -| samd21j15a | --- | -| samd21j16a | --- | -| samd21j17a | --- | -| samd21j18a | --- | +#### ARM32 + +| MCU | Status | +|:------------|--------------:| +| samd21e15a | :question: | +| samd21e16a | :question: | +| samd21e17a | :question: | +| samd21e18a | :question: | +| samd21g15a | :question: | +| samd21g16a | :question: | +| samd21g17a | :question: | +| samd21g17au | :question: | +| samd21g18a | :question: | +| samd21g18au | :question: | +| samd21j15a | :question: | +| samd21j16a | :question: | +| samd21j17a | :question: | +| samd21j18a | :question: | +| samd51g18a | :question: | +| samd51g19a | :question: | +| samd51j18a | :question: | +| samd51j19a | :question: | +| samd51j20a | :question: | +| samd51n19a | :question: | +| samd51n20a | :question: | +| samd51p19a | :question: | +| samd51p20a | :question: | +| same54n19a | :question: | +| same54n20a | :question: | +| same54p19a | :question: | +| same54p20a | :question: | +| same70j19a | :exclamation: | +| same70j20a | :exclamation: | +| same70j21a | :exclamation: | +| same70n19a | :exclamation: | +| same70n20a | :exclamation: | +| same70n21a | :exclamation: | +| same70q19a | :exclamation: | +| same70q20a | :exclamation: | +| same70q21a | :exclamation: | + +#### RISC-V + +| MCU | Status | +|:----|-------:| +| | | + diff --git a/env.sh b/env.sh new file mode 100644 index 00000000..05a7907c --- /dev/null +++ b/env.sh @@ -0,0 +1,2 @@ +#!/bin/bash + From f8bb9afba72c3893d082c65ae7b1d04c07acd8b2 Mon Sep 17 00:00:00 2001 From: Penguin Date: Sun, 21 Nov 2021 15:50:55 -0600 Subject: [PATCH 4/5] adding documentation --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 056b634c..ef96ff21 100644 --- a/README.md +++ b/README.md @@ -192,15 +192,15 @@ The framework allows me to add support for mcus pretty rapidly. I can add entire | samd21j16a | :question: | | samd21j17a | :question: | | samd21j18a | :question: | -| samd51g18a | :question: | -| samd51g19a | :question: | -| samd51j18a | :question: | -| samd51j19a | :question: | -| samd51j20a | :question: | -| samd51n19a | :question: | -| samd51n20a | :question: | -| samd51p19a | :question: | -| samd51p20a | :question: | +| samd51g18a | :grey_question: | +| samd51g19a | :grey_question: | +| samd51j18a | :grey_question: | +| samd51j19a | :grey_question: | +| samd51j20a | :grey_question: | +| samd51n19a | :grey_question: | +| samd51n20a | :grey_question: | +| samd51p19a | :grey_question: | +| samd51p20a | :grey_question: | | same54n19a | :question: | | same54n20a | :question: | | same54p19a | :question: | @@ -217,7 +217,7 @@ The framework allows me to add support for mcus pretty rapidly. I can add entire #### RISC-V -| MCU | Status | -|:----|-------:| -| | | - +| MCU | Status | +|:----------|--------------:| +| fe310g000 | :exclamation: | +| fe310g002 | :exclamation: | From e4f5ca0a30ebcc91f93ca59215f009d2078096d9 Mon Sep 17 00:00:00 2001 From: Penguin Date: Sun, 21 Nov 2021 17:03:26 -0600 Subject: [PATCH 5/5] changed make-manifest to use default arm-none-eabi toolchain and arm-none-eabi-gdb instead of arm-none-eabi-gdb-py for maximum compatibility --- manifest/make-manifest.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest/make-manifest.toml b/manifest/make-manifest.toml index ef8b93ab..0e712041 100644 --- a/manifest/make-manifest.toml +++ b/manifest/make-manifest.toml @@ -8,7 +8,7 @@ CC = "${TOOLCHAIN}-gcc" CXX = "${TOOLCHAIN}-g++" OBJCOPY = "${TOOLCHAIN}-objcopy" OBJDUMP = "${TOOLCHAIN}-objdump" -GDB = "${TOOLCHAIN}-gdb-py" +GDB = "${TOOLCHAIN}-gdb" SIZE = "${TOOLCHAIN}-size" AS = "${TOOLCHAIN}-as" DIR_INCLUDES = ["-I$(QUOTE)../../../ESF/mcu/inc$(QUOTE)", @@ -46,7 +46,8 @@ HEX_TARGET_PREREQS = ["$(PROJECT_NAME).elf"] HEX_TARGET_CMDS = ["$(QUOTE)$(OBJCOPY)$(QUOTE) -O ihex $(HEX_FLAGS) $(QUOTE)$<$(QUOTE) $(QUOTE)$@$(QUOTE)"] [arch.arm] -TOOLCHAIN = "${ESF_DIR}/toolchains/arm-none-eabi-toolchain/bin/arm-none-eabi" +TOOLCHAIN = "arm-none-eabi" +# TOOLCHAIN = "${ESF_DIR}/toolchains/arm-none-eabi-toolchain/bin/arm-none-eabi" CFLAGS = ["-x c", "-DDEBUG", "-Os", "-g3", "-Wall",