Skip to content

Commit

Permalink
Bumped to v2024.01 (#6)
Browse files Browse the repository at this point in the history
- Updated tutorial for BXARM 9.50.1
  • Loading branch information
felipe-iar authored Jan 8, 2024
1 parent 6a2a7d2 commit 6967896
Show file tree
Hide file tree
Showing 95 changed files with 105,922 additions and 304 deletions.
201 changes: 201 additions & 0 deletions .github/workflows/bxarm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
name: BXARM on Linux

# This workflow will run when a push is made to any branch in the repository
on: push

# Workflow's environment variables can be referred by all jobs
env:
TARGET_DIR: /opt/iarsystems/bxarm-9.50.1/arm/bin
COMMON_DIR: /opt/iarsystems/bxarm-9.50.1/common/bin

jobs:
build-library:
runs-on: [ self-hosted, linux ]
steps:
- uses: actions/checkout@v4

- name: Check compiler version
run: |
$COMMON_DIR/../../arm/bin/iccarm --version
- name: Build library
run: |
$COMMON_DIR/iarbuild project/EWARM/ChecksumLibrary.ewp -make Debug -log all
- name: Upload library
uses: actions/upload-artifact@v3
with:
name: library
path: project/EWARM/Debug/Exe/ChecksumLibrary.a
if-no-files-found: error

cstat-library:
runs-on: [ self-hosted, linux ]
steps:
- uses: actions/checkout@v4

- name: C-STAT - Library
run: |
$COMMON_DIR/iarbuild project/EWARM/ChecksumLibrary.ewp -cstat_analyze Debug -log all
$COMMON_DIR/iarbuild project/EWARM/ChecksumLibrary.ewp -cstat_report Debug -log all
- name: Upload library report (C-STAT)
uses: actions/upload-artifact@v3
with:
name: library-report.html
path: project/EWARM/Debug/C-STAT/*.html
if-no-files-found: error

build-project:
needs: build-library
runs-on: [ self-hosted, linux ]
steps:
- uses: actions/checkout@v4
- name: Download library
uses: actions/download-artifact@v3
with:
name: library
path: project/EWARM/Debug/Exe/

- name: Build project
run: |
$COMMON_DIR/iarbuild project/EWARM/project.ewp -make Debug -log all
- name: Upload project
uses: actions/upload-artifact@v3
with:
name: project
path: project/EWARM/Debug/Exe/project.out
if-no-files-found: error

# Comment out the `cstat-project` job if your license has no IAR C-STAT for static code analysis
cstat-project:
needs: build-project
runs-on: [ self-hosted, linux ]
steps:
- uses: actions/checkout@v4
- name: Static Analysis
run: |
$COMMON_DIR/iarbuild project/EWARM/project.ewp -cstat_analyze Debug -log all
$COMMON_DIR/iarbuild project/EWARM/project.ewp -cstat_report Debug -log all
- name: Upload project report (C-STAT)
uses: actions/upload-artifact@v3
with:
name: project-cstat.html
path: project/EWARM/project/C-STAT/*.html
if-no-files-found: error

# Comment out the `crun-project` job if your license has no IAR C-RUN for runtime analysis
crun-project:
needs: build-project
runs-on: [ self-hosted, linux ]
steps:
- name: Download project
uses: actions/download-artifact@v3
with:
name: project
path: project/EWARM/Debug/Exe/

- name: Runtime Analysis
run: |
$COMMON_DIR/CSpyBat \
$TARGET_DIR/libarmPROC.so \
$TARGET_DIR/libarmSIM2.so \
--plugin=$TARGET_DIR/libarmLibsupportUniversal.so \
--debug_file=project/EWARM/Debug/Exe/project.out \
--rtc_enable \
--rtc_output=crun-messages.txt \
--timeout=2000000 \
--backend \
--cpu=cortex-m4 \
--fpu=vfpv4_sp \
--endian=little \
--semihosting || true
- name: Upload project report (C-RUN)
uses: actions/upload-artifact@v3
with:
name: project-crun.txt
path: ./crun-messages.txt
if-no-files-found: error

# Update `needs` to `build-project` if you do not have C-STAT and/or C-RUN enabled for your license
cspy-project-on-hw:
needs: [ cstat-project, crun-project ]
runs-on: [ self-hosted, linux ]
steps:
- name: Download project
uses: actions/download-artifact@v3
with:
name: project
path: project/EWARM/Debug/Exe/

- name: Run project on-hardware
run: |
$COMMON_DIR/CSpyBat \
$TARGET_DIR/libarmPROC.so \
$TARGET_DIR/libarmJET.so \
--plugin=$TARGET_DIR/libarmLibsupportUniversal.so \
--device_macro=$TARGET_DIR/../config/debugger/ST/STM32F4xx.dmac \
--flash_loader=$TARGET_DIR/../config/flashloader/ST/FlashSTM32F4xxx.board \
--debug_file=project/EWARM/Debug/Exe/project.out \
--timeout=2000000 \
--backend \
--board_file=$TARGET_DIR/../config/flashloader/ST/FlashSTM32F4xxx.board \
--endian=little \
--cpu=cortex-m4 \
--fpu=vfpv4_sp \
-p $TARGET_DIR/../config/debugger/ST/STM32F407VG.ddf \
--semihosting \
--device=STM32F407VG \
--multicore_nr_of_cores=1 \
--jet_standard_reset=9,0,0 \
--reset_style=\"0,-,0,Disabled__no_reset_\" \
--reset_style=\"1,-,0,Software\" \
--reset_style=\"2,-,0,Hardware\" \
--reset_style=\"3,-,0,Core\" \
--reset_style=\"4,-,0,System\" \
--reset_style=\"9,ConnectUnderReset,1,Connect_during_reset\" \
--jet_power_from_probe=switch_off \
--drv_communication_log=cspycomm.log \
--drv_interface=SWD \
--jet_swo_protocol=Manchester \
--jet_cpu_clock=72000000 \
--jet_swo_prescaler=1 \
--drv_catch_exceptions=0xff0 \
--drv_trace_settings=None
- name: Upload C-SPY log
uses: actions/upload-artifact@v3
with:
name: cspycomm.log
path: ./cspycomm.log
if-no-files-found: error

# Update `needs` to `build-project` if you do not have C-STAT and/or C-RUN enabled for your license
deploy:
needs: cspy-project-on-hw
runs-on: [ self-hosted, linux ]
steps:
- name: Download ELF
uses: actions/download-artifact@v3
with:
name: project
path: ./

- name: Convert to SREC
run: |
mkdir output
$TARGET_DIR/ielftool --srec --verbose project.out output/project.srec
- name: Convert to HEX
run: |
$TARGET_DIR/ielftool --ihex --verbose project.out output/project.hex
- name: Upload firmwares
uses: actions/upload-artifact@v3
with:
name: firmwares-srec-hex
path: ./output/*.*
if-no-files-found: error
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Debug/
Release/
settings/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Felipe Torrezan
Copyright (c) 2020-23 IAR Systems AB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 6967896

Please sign in to comment.