Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bakerstu/openmrn into bracz-direc…
Browse files Browse the repository at this point in the history
…t-hub-router

* 'master' of github.com:bakerstu/openmrn: (152 commits)
  Switches over make tests at toplevel to use the tests target instead of the cov target.
  Ensures that openmrn and application directory builds can run in parallel. (#754)
  Ensures that 'make clean' empties lib directory of symlinks. (#753)
  Add an input/output GPIO type. This helps support bit banged I2C. (#752)
  Adds TinyUsb based CDC virtual Com port driver with an STM32 port. (#748)
  Limit the amount of input we read into memory in arduino sketches. (#746)
  Updates to send_datagram cmdline utility (#740)
  Adds lflash command to the bracz-railcom board support makefile.
  Do not crash on an incoming message with 0 alias. (#751)
  Add common app test coverage rules. (#750)
  Fix symlinking of library files to the lib directory. (#747)
  Refactors the SPIFFS flash driver for the F7 into a generic stm32 flash driver. (#742)
  Unaligned read/write support in TivaEEPROM storage (#741)
  Adds support for producer/consumer identified message in the CallbackEventHandler. (#743)
  Improve error handling in BroadcastTimeDefs::string_to_date() (#745)
  Fix test makefiles and test target (#736)
  Moves the bootloader hook so that the hook implementation gets a chance to look at incoming frames.
  Fixes missing includes.
  Fixes missing symbol error.
  Adds stm32f072 HAL drivers to bare.armv6m compilation target.
  ...
  • Loading branch information
balazsracz committed Dec 22, 2023
2 parents 4422475 + 2a1f4b3 commit 49bc1be
Show file tree
Hide file tree
Showing 314 changed files with 22,559 additions and 3,360 deletions.
23 changes: 22 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Standard: Cpp11
IndentWidth: 4
TabWidth: 8
UseTab: Never
BreakBeforeBraces: Allman
# BreakBeforeBraces: Allman
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false
SpacesInAngles: false
Expand All @@ -43,5 +43,26 @@ SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4

# This big block of settings works around indentation after an extern "C"
BraceWrapping: {
AfterCaseLabel: true,
AfterClass: true,
AfterControlStatement: true,
AfterEnum: true,
AfterFunction: true,
AfterNamespace: true,
AfterObjCDeclaration: true,
AfterStruct: true,
AfterUnion: true,
AfterExternBlock: false,
BeforeCatch: true,
BeforeElse: true,
IndentBraces: false,
SplitEmptyFunction: true,
SplitEmptyRecord: false,
SplitEmptyNamespace: false }
BreakBeforeBraces: Custom
IndentExternBlock: false
...

58 changes: 48 additions & 10 deletions .github/workflows/ArduinoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ on:
- '**ArduinoBuild.yml'
pull_request:
jobs:
build:
name: Build ESP32 examples
build-stm32:
name: Build Arduino STM32 examples
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -26,24 +26,62 @@ jobs:
- name: Generate OpenMRNLite library
run: |
mkdir --parents $HOME/Arduino/libraries/OpenMRNLite
$GITHUB_WORKSPACE/arduino/libify.sh $HOME/Arduino/libraries/OpenMRNLite $GITHUB_WORKSPACE -f -l
$GITHUB_WORKSPACE/arduino/libify.sh $HOME/Arduino/libraries/OpenMRNLite $GITHUB_WORKSPACE -f
rm -f $GITHUB_WORKSPACE/arduino/examples/Stm*/build_opt.h
- name: Compile all STM32 examples
uses: ArminJo/arduino-test-compile@v3.0.0
- name: Compile STM32 examples
uses: ArminJo/arduino-test-compile@v3
with:
platform-url: https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json
arduino-board-fqbn: STM32:stm32:Nucleo_144:pnum=NUCLEO_F767ZI,upload_method=MassStorage,xserial=generic,usb=CDCgen,xusb=FS,opt=osstd,rtlib=nano
sketch-names: Stm32*.ino
build-properties: '{ "All": "-DHAL_CAN_MODULE_ENABLED" }'
debug-compile: true

- name: Compile all ESP32 examples
uses: ArminJo/[email protected]
required-libraries: OpenMRNLite

build-esp32:
name: Build Arduino ${{ matrix.target }} examples
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
target: [esp32, esp32c3, esp32s2]
steps:
- name: Checkout
uses: actions/checkout@master

- name: Generate OpenMRNLite library
run: |
mkdir --parents $HOME/Arduino/libraries/OpenMRNLite
$GITHUB_WORKSPACE/arduino/libify.sh $HOME/Arduino/libraries/OpenMRNLite $GITHUB_WORKSPACE -f
rm -f $GITHUB_WORKSPACE/arduino/examples/Stm*/build_opt.h
- name: Compile ESP32 examples
uses: ArminJo/arduino-test-compile@v3
with:
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
arduino-board-fqbn: esp32:esp32:node32s
sketch-names: ESP*.ino
sketch-names: ESP32CanLoadTest.ino,ESP32IOBoard.ino,ESP32SerialBridge.ino,ESP32WifiCanBridge.ino
debug-compile: true
required-libraries: OpenMRNLite
if: ${{ matrix.target == 'esp32' }}


- name: Compile ESP32-C3 examples
uses: ArminJo/arduino-test-compile@v3
with:
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
arduino-board-fqbn: esp32:esp32:esp32c3
sketch-names: ESP32C3CanLoadTest.ino,ESP32C3IOBoard.ino
debug-compile: true
required-libraries: OpenMRNLite
if: ${{ matrix.target == 'esp32c3' }}

- name: Compile ESP32-S2 examples
uses: ArminJo/arduino-test-compile@v3
with:
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
arduino-board-fqbn: esp32:esp32:esp32s2
sketch-names: ESP32S2CanLoadTest.ino,ESP32S2IOBoard.ino
debug-compile: true
required-libraries: OpenMRNLite
if: ${{ matrix.target == 'esp32s2' }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cov:
$(MAKE) -C targets/cov cov

tests:
$(MAKE) -C targets/cov tests
$(MAKE) -C targets/test tests

llvm-tests:
$(MAKE) -C targets/linux.llvm run-tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bootloader_client.js
node_modules
# released binary
openmrn-bootloader-client-*
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ release:
pkg -C Brotli .


clean: clean-wasm
clean: clean-wasm clean-bin


clean-wasm:
rm -f $(EXECUTABLE).{wasm,wast}

clean-bin:
rm -f openmrn-bootloader-client-{linux,macos,win.exe}
6 changes: 6 additions & 0 deletions applications/js_client/client.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ void ignore_function()
{
}

namespace openlcb {
extern int g_bootloader_timeout_sec;
}

class QueryFlow : public StateFlowBase
{
public:
Expand Down Expand Up @@ -419,6 +423,8 @@ class JSBootloaderClient : private Notifiable {
std::string source_file_name, bool reboot_first,
emscripten::val progress_cb, emscripten::val done_cb)
{
openlcb::g_bootloader_timeout_sec = 30;

HASSERT(bn_.is_done());
response_.error_code = 0;
response_.error_details.clear();
Expand Down
Loading

0 comments on commit 49bc1be

Please sign in to comment.