mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update compilers (#1858)
* Update Alpine Image * Update push.yml * Style updates
This commit is contained in:
44
.github/workflows/push.yml
vendored
44
.github/workflows/push.yml
vendored
@@ -3,23 +3,31 @@ name: CI
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: alpine:3.16
|
image: alpine:3.19
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2", "S60", "TS101"]
|
model:
|
||||||
|
[
|
||||||
|
"TS100",
|
||||||
|
"TS80",
|
||||||
|
"TS80P",
|
||||||
|
"Pinecil",
|
||||||
|
"MHP30",
|
||||||
|
"Pinecilv2",
|
||||||
|
"S60",
|
||||||
|
"TS101",
|
||||||
|
]
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
run: apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git bash
|
run: apk add --no-cache gcc-riscv-none-elf g++-riscv-none-elf gcc-arm-none-eabi g++-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git bash
|
||||||
|
|
||||||
- name: Install dependencies (python)
|
- name: Install dependencies (python)
|
||||||
run: python3 -m pip install bdflib
|
run: python3 -m pip install --break-system-packages bdflib
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -58,11 +66,10 @@ jobs:
|
|||||||
name: metadata
|
name: metadata
|
||||||
path: source/Hexfile/${{ matrix.model }}.json
|
path: source/Hexfile/${{ matrix.model }}.json
|
||||||
|
|
||||||
|
|
||||||
build_multi-lang:
|
build_multi-lang:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: alpine:3.16
|
image: alpine:3.19
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
model: ["Pinecil", "Pinecilv2"]
|
model: ["Pinecil", "Pinecilv2"]
|
||||||
@@ -70,9 +77,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
run: apk add --no-cache gcc-riscv-none-elf newlib-riscv-none-elf findutils python3 py3-pip make git bash musl-dev
|
run: apk add --no-cache gcc-riscv-none-elf g++-riscv-none-elf gcc-arm-none-eabi g++-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git bash musl-dev
|
||||||
- name: Install dependencies (python)
|
- name: Install dependencies (python)
|
||||||
run: python3 -m pip install bdflib
|
run: python3 -m pip install --break-system-packages bdflib
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -111,11 +118,10 @@ jobs:
|
|||||||
name: metadata
|
name: metadata
|
||||||
path: source/Hexfile/${{ matrix.model }}_multi-lang.json
|
path: source/Hexfile/${{ matrix.model }}_multi-lang.json
|
||||||
|
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: alpine:3.16
|
image: alpine:3.19
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
@@ -126,7 +132,7 @@ jobs:
|
|||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Install dependencies (python)
|
- name: Install dependencies (python)
|
||||||
run: python3 -m pip install bdflib
|
run: python3 -m pip install --break-system-packages bdflib
|
||||||
|
|
||||||
- name: Run python tests
|
- name: Run python tests
|
||||||
run: ./Translations/make_translation_test.py
|
run: ./Translations/make_translation_test.py
|
||||||
@@ -134,11 +140,10 @@ jobs:
|
|||||||
- name: Run BriefLZ tests
|
- name: Run BriefLZ tests
|
||||||
run: make -C source/ Objects/host/brieflz/libbrieflz.so && ./Translations/brieflz_test.py
|
run: make -C source/ Objects/host/brieflz/libbrieflz.so && ./Translations/brieflz_test.py
|
||||||
|
|
||||||
|
|
||||||
check_c-cpp:
|
check_c-cpp:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: alpine:3.16
|
image: alpine:3.19
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
@@ -151,11 +156,10 @@ jobs:
|
|||||||
- name: Check format style with clang-format
|
- name: Check format style with clang-format
|
||||||
run: make clean check-style
|
run: make clean check-style
|
||||||
|
|
||||||
|
|
||||||
check_python:
|
check_python:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: alpine:3.16
|
image: alpine:3.19
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
@@ -166,7 +170,7 @@ jobs:
|
|||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Install dependencies (python)
|
- name: Install dependencies (python)
|
||||||
run: python3 -m pip install bdflib flake8
|
run: python3 -m pip install --break-system-packages bdflib flake8
|
||||||
|
|
||||||
- name: Check python formatting with black
|
- name: Check python formatting with black
|
||||||
run: black --check Translations
|
run: black --check Translations
|
||||||
@@ -174,7 +178,6 @@ jobs:
|
|||||||
- name: Check python with flake8
|
- name: Check python with flake8
|
||||||
run: flake8 Translations
|
run: flake8 Translations
|
||||||
|
|
||||||
|
|
||||||
check_shell:
|
check_shell:
|
||||||
name: check_shell
|
name: check_shell
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -188,11 +191,10 @@ jobs:
|
|||||||
exclude: "./.git/*" # Optional.
|
exclude: "./.git/*" # Optional.
|
||||||
check_all_files_with_shebangs: "false" # Optional.
|
check_all_files_with_shebangs: "false" # Optional.
|
||||||
|
|
||||||
|
|
||||||
check_readme:
|
check_readme:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: alpine:3.16
|
image: alpine:3.19
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies (apk)
|
- name: Install dependencies (apk)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# Default Reference Distro for development env & deploy:
|
# Default Reference Distro for development env & deploy:
|
||||||
# * Alpine Linux, version 3.16 *
|
# * Alpine Linux, version 3.19 *
|
||||||
FROM alpine:3.16
|
|
||||||
|
FROM alpine:3.19
|
||||||
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
||||||
|
|
||||||
# Default current dir when container starts
|
# Default current dir when container starts
|
||||||
@@ -14,7 +15,7 @@ WORKDIR /build/ironos
|
|||||||
## - clang (required for clang-format to check C++ code formatting)
|
## - clang (required for clang-format to check C++ code formatting)
|
||||||
## - shellcheck (to check sh scripts)
|
## - shellcheck (to check sh scripts)
|
||||||
|
|
||||||
ARG APK_COMPS="gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi"
|
ARG APK_COMPS="gcc-riscv-none-elf g++-riscv-none-elf gcc-arm-none-eabi g++-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi"
|
||||||
ARG APK_PYTHON="python3 py3-pip black"
|
ARG APK_PYTHON="python3 py3-pip black"
|
||||||
ARG APK_MISC="findutils make git diffutils zip"
|
ARG APK_MISC="findutils make git diffutils zip"
|
||||||
ARG APK_DEV="musl-dev clang bash clang-extra-tools shellcheck"
|
ARG APK_DEV="musl-dev clang bash clang-extra-tools shellcheck"
|
||||||
@@ -25,8 +26,8 @@ ARG PIP_PKGS='bdflib flake8 pymdown-extensions mkdocs mkdocs-autolinks-plugin mk
|
|||||||
# Install system packages using alpine package manager
|
# Install system packages using alpine package manager
|
||||||
RUN apk add --no-cache ${APK_COMPS} ${APK_PYTHON} ${APK_MISC} ${APK_DEV}
|
RUN apk add --no-cache ${APK_COMPS} ${APK_PYTHON} ${APK_MISC} ${APK_DEV}
|
||||||
|
|
||||||
# Install Python3 packages as modules using pip
|
# Install Python3 packages as modules using pip, yes we dont care if packages break
|
||||||
RUN python3 -m pip install ${PIP_PKGS}
|
RUN python3 -m pip install --break-system-packages ${PIP_PKGS}
|
||||||
|
|
||||||
# Git trust to avoid related warning
|
# Git trust to avoid related warning
|
||||||
RUN git config --global --add safe.directory /build/ironos
|
RUN git config --global --add safe.directory /build/ironos
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ void SystemInit(void) {
|
|||||||
#ifdef VECT_TAB_SRAM
|
#ifdef VECT_TAB_SRAM
|
||||||
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
||||||
#else
|
#else
|
||||||
SCB->VTOR = FLASH_BASE | 0x8000; /* Vector Table Relocation in Internal FLASH. */
|
SCB->VTOR = FLASH_BASE | 0x8000; /* Vector Table Relocation in Internal FLASH. */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ static void MX_TIP_CONTROL_TIMER_Init(void) {
|
|||||||
#ifdef TIP_HAS_DIRECT_PWM
|
#ifdef TIP_HAS_DIRECT_PWM
|
||||||
sConfigOC.Pulse = 0; // PWM is direct to tip
|
sConfigOC.Pulse = 0; // PWM is direct to tip
|
||||||
#else
|
#else
|
||||||
sConfigOC.Pulse = 127; // 50% duty cycle, that is AC coupled through the cap to provide an on signal (This does not do tip at 50% duty cycle)
|
sConfigOC.Pulse = 127; // 50% duty cycle, that is AC coupled through the cap to provide an on signal (This does not do tip at 50% duty cycle)
|
||||||
#endif
|
#endif
|
||||||
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||||
sConfigOC.OCFastMode = TIM_OCFAST_ENABLE;
|
sConfigOC.OCFastMode = TIM_OCFAST_ENABLE;
|
||||||
@@ -336,7 +336,7 @@ static void MX_TIP_CONTROL_TIMER_Init(void) {
|
|||||||
// Remap TIM3_CH1 to be on PB4
|
// Remap TIM3_CH1 to be on PB4
|
||||||
__HAL_AFIO_REMAP_TIM3_PARTIAL();
|
__HAL_AFIO_REMAP_TIM3_PARTIAL();
|
||||||
#else
|
#else
|
||||||
// No re-map required
|
// No re-map required
|
||||||
#endif
|
#endif
|
||||||
HAL_TIM_PWM_Start(&htimTip, PWM_Out_CHANNEL);
|
HAL_TIM_PWM_Start(&htimTip, PWM_Out_CHANNEL);
|
||||||
}
|
}
|
||||||
@@ -480,8 +480,8 @@ static void MX_GPIO_Init(void) {
|
|||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
/* TS80 */
|
/* TS80 */
|
||||||
/* Leave USB lines open circuit*/
|
/* Leave USB lines open circuit*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ void SystemInit(void) {
|
|||||||
#ifdef VECT_TAB_SRAM
|
#ifdef VECT_TAB_SRAM
|
||||||
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
||||||
#else
|
#else
|
||||||
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
|
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
//#define ENABLE_KERNEL_DEBUG
|
// #define ENABLE_KERNEL_DEBUG
|
||||||
|
|
||||||
#ifdef ENABLE_KERNEL_DEBUG
|
#ifdef ENABLE_KERNEL_DEBUG
|
||||||
#define FREERTOS_PORT_DEBUG(...) printf(__VA_ARGS__)
|
#define FREERTOS_PORT_DEBUG(...) printf(__VA_ARGS__)
|
||||||
|
|||||||
@@ -258,9 +258,7 @@ static struct bt_gatt_attr ble_attrs_declaration[] = {
|
|||||||
NAME
|
NAME
|
||||||
get_attr
|
get_attr
|
||||||
*/
|
*/
|
||||||
struct bt_gatt_attr *get_attr(u8_t index) {
|
struct bt_gatt_attr *get_attr(u8_t index) { return &ble_attrs_declaration[index]; }
|
||||||
return &ble_attrs_declaration[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct bt_gatt_service ble_tp_server = BT_GATT_SERVICE(ble_attrs_declaration);
|
static struct bt_gatt_service ble_tp_server = BT_GATT_SERVICE(ble_attrs_declaration);
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ void SystemInit(void) {
|
|||||||
#ifdef VECT_TAB_SRAM
|
#ifdef VECT_TAB_SRAM
|
||||||
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
|
||||||
#else
|
#else
|
||||||
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
|
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ flash_size=128k
|
|||||||
bootldr_size=0x0
|
bootldr_size=0x0
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CPUFLAGS=-march=rv32imac \
|
CPUFLAGS=-march=rv32imaczicsr \
|
||||||
-mabi=ilp32 \
|
-mabi=ilp32 \
|
||||||
-mcmodel=medany \
|
-mcmodel=medany \
|
||||||
-fsigned-char \
|
-fsigned-char \
|
||||||
@@ -410,7 +410,7 @@ LDSCRIPT=./Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld
|
|||||||
DEVICE_DFU_ADDRESS=0x23000000
|
DEVICE_DFU_ADDRESS=0x23000000
|
||||||
# DFU starts at the beginning of flash
|
# DFU starts at the beginning of flash
|
||||||
# Flags
|
# Flags
|
||||||
CPUFLAGS=-march=rv32imafc \
|
CPUFLAGS=-march=rv32imafczicsr \
|
||||||
-mabi=ilp32f \
|
-mabi=ilp32f \
|
||||||
-mcmodel=medany \
|
-mcmodel=medany \
|
||||||
-fsigned-char \
|
-fsigned-char \
|
||||||
|
|||||||
Reference in New Issue
Block a user