Skip to content

Commit

Permalink
Merge pull request #435 from Luos-io/feat/isolate_robus
Browse files Browse the repository at this point in the history
Any kind of network support + multi-phy, fix #428
  • Loading branch information
nicolas-rabault authored Sep 19, 2023
2 parents 95eed57 + bd5778f commit f8142c1
Show file tree
Hide file tree
Showing 842 changed files with 21,900 additions and 42,265 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,24 @@ jobs:
# Run Unit tests
platformio test -vvv
- if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y lcov
lcov -d .pio/build/native/ -c -o lcov.info
lcov --remove lcov.info '*/usr/*' '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' '*/network/*' -o lcov.info
- if: matrix.os == 'ubuntu-latest'
name: Coveralls
uses: coverallsapp/github-action@v2

unit-tests:
name: Unit tests
needs: tests-run
runs-on: ubuntu-latest
steps:
- run: echo "Tests succeed!"


code-format:
name: Code format
runs-on: ubuntu-latest
Expand Down
86 changes: 33 additions & 53 deletions .github/workflows/pio_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
pio package publish --owner luos --non-interactive
cd ../..
deploy_inspector:
deploy_pipe:
needs: check_valid_tag
runs-on: ubuntu-latest
steps:
Expand All @@ -123,64 +123,44 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install platformio
- name: publish inspector tool
- name: publish pipe driver
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PIO_TOKEN }}
run: |
# ***** Inspector publication *****
cd tool_services/inspector
mkdir examples
# Arduino
mkdir examples/Arduino
mkdir examples/Arduino/serial
cp -r ../../examples/projects/Arduino/inspector_serialcom/* examples/Arduino/serial/
# l0
mkdir examples/l0
mkdir examples/l0/serial
cp -r ../../examples/projects/l0/inspector_serialcom/* examples/l0/serial/
# NUCLEO-F072RB
mkdir examples/NUCLEO-F072RB
mkdir examples/NUCLEO-F072RB/serial
cp -r ../../examples/projects/NUCLEO-F072RB/inspector_serialcom/* examples/NUCLEO-F072RB/serial/
# NUCLEO-F401RE
mkdir examples/NUCLEO-F401RE
mkdir examples/NUCLEO-F401RE/serial
cp -r ../../examples/projects/NUCLEO-F401RE/inspector_serialcom/* examples/NUCLEO-F401RE/serial/
# NUCLEO-F410RB
mkdir examples/NUCLEO-F410RB
mkdir examples/NUCLEO-F410RB/serial
cp -r ../../examples/projects/NUCLEO-F410RB/inspector_serialcom/* examples/NUCLEO-F410RB/serial/
# NUCLEO-G431KB
mkdir examples/NUCLEO-G431KB
mkdir examples/NUCLEO-G431KB/serial
cp -r ../../examples/projects/NUCLEO-G431KB/inspector_serialcom/* examples/NUCLEO-G431KB/serial/
# NUCLEO-G474RE
mkdir examples/NUCLEO-G474RE
mkdir examples/NUCLEO-G474RE/serial
cp -r ../../examples/projects/NUCLEO-G474RE/inspector_serialcom/* examples/NUCLEO-G474RE/serial/
# ***** Pipe publication *****
cd tool_services/pipe
# We don't publish examples with this one.
# NUCLEO-L432KC
mkdir examples/NUCLEO-L432KC
mkdir examples/NUCLEO-L432KC/serial
cp -r ../../examples/projects/NUCLEO-L432KC/inspector_serialcom/* examples/NUCLEO-L432KC/serial/
pio package pack
pio package publish --owner luos --non-interactive
cd ../..
# STM32F4-discovery
mkdir examples/STM32F4-discovery
mkdir examples/STM32F4-discovery/serial
cp -r ../../examples/projects/STM32F4-discovery/inspector_serialcom/* examples/STM32F4-discovery/serial/
deploy_robus:
needs: check_valid_tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
- name: publish robus network
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PIO_TOKEN }}
run: |
# ***** Robus network publication *****
cd network/robus_network
# We don't publish examples with this one.
pio package pack
pio package publish --owner luos --non-interactive
cd ../..
deploy_pipe:
deploy_serial:
needs: check_valid_tag
runs-on: ubuntu-latest
steps:
Expand All @@ -193,14 +173,14 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install platformio
- name: publish pipe driver
- name: publish robus network
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PIO_TOKEN }}
run: |
# ***** Pipe publication *****
cd tool_services/pipe
# ***** Serial network publication *****
cd network/serial_network
# We don't publish examples with this one.
pio package pack
pio package publish --owner luos --non-interactive
cd ../..
cd ../..
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
**/.gitignore
*.out
*.log
*.info
*.profraw
cov/*
/examples/projects/NUCLEO-G431KB/button/.mxproject
/examples/projects/NUCLEO-G431KB/button/Button.gpdsc
/examples/projects/NUCLEO-L432KC/button/Button.gpdsc
Expand All @@ -31,4 +34,7 @@
/examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/build/
/examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/.generated_files/
/examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/dist/
examples/projects/ESP32/button/sdkconfig.esp32dev
examples/projects/ESP32/led/sdkconfig.esp32dev
tool_services/pipe/WS/ARDUINO/arduinoWebSockets/
mongoose/
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ Luos proposes organized and effective development practices, guaranteeing develo

* → Try on your own with the [get started](https://www.luos.io/tutorials/get-started)
* → Consult the full [documentation](https://www.luos.io/docs)

## Disclaimer
Using Platformio, this library compilation send some anonymous information to Luos allowing to improve Luos_engine experience.
To disable the telemetry please add "-DNOTELEMETRY" as a compilation flag on your platformio.ini file.
190 changes: 190 additions & 0 deletions engine/HAL/ARDUINO/luos_hal.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
/******************************************************************************
* @file luosHAL
* @brief Luos Hardware Abstration Layer. Describe Low layer fonction
* @MCU Family ATSAMD21
* @author Luos
* @version 0.0.0
******************************************************************************/
#include "luos_hal.h"

#include <stdbool.h>
#include <string.h>

// MCU dependencies this HAL is for family Atmel ATSAMD21 you can find

/*******************************************************************************
* Definitions
******************************************************************************/
#define DEFAULT_TIMEOUT 30
#define TIMEOUT_ACK DEFAULT_TIMEOUT / 4
/*******************************************************************************
* Variables
******************************************************************************/

// timestamp variable
uint64_t start_offset;
/*******************************************************************************
* Function
******************************************************************************/
static void LuosHAL_SystickInit(void);
static void LuosHAL_FlashInit(void);

/////////////////////////Luos Library Needed function///////////////////////////

/******************************************************************************
* @brief Luos HAL general initialisation
* @param None
* @return None
******************************************************************************/
void LuosHAL_Init(void)
{
// Systick Initialization
LuosHAL_SystickInit();

// Flash Initialization
LuosHAL_FlashInit();

// start timestamp
LuosHAL_StartTimestamp();
}
/******************************************************************************
* @brief Luos HAL general disable IRQ
* @param Enable : Set to "True" to enable IRQ, "False" otherwise
* @return None
******************************************************************************/
_CRITICAL void LuosHAL_SetIrqState(bool Enable)
{
}
/******************************************************************************
* @brief Luos HAL general systick tick at 1ms initialize
* @param None
* @return Tick Counter
******************************************************************************/
static void LuosHAL_SystickInit(void)
{
}
/******************************************************************************
* @brief Luos HAL general systick tick at 1ms
* @param None
* @return Tick Counter
******************************************************************************/
_CRITICAL uint32_t LuosHAL_GetSystick(void)
{
return millis();
}

/******************************************************************************
* @brief Luos GetTimestamp
* @param None
* @return uint64_t
******************************************************************************/
_CRITICAL uint64_t LuosHAL_GetTimestamp(void)
{
return micros() * 1000 - start_offset;
}

/******************************************************************************
* @brief Luos start Timestamp
* @param None
* @return None
******************************************************************************/
_CRITICAL void LuosHAL_StartTimestamp(void)
{
start_offset = LuosHAL_GetSystick();
}

/******************************************************************************
* @brief Luos stop Timestamp
* @param None
* @return None
******************************************************************************/
_CRITICAL void LuosHAL_StopTimestamp(void)
{
start_offset = 0;
}

/******************************************************************************
* @brief Flash Initialisation
* @param None
* @return None
******************************************************************************/
static void LuosHAL_FlashInit(void)
{
}
/******************************************************************************
* @brief Set boot mode in shared flash memory
* @param None
* @return
******************************************************************************/
_CRITICAL void LuosHAL_SetMode(uint8_t mode)
{
}

/******************************************************************************
* @brief Save node ID in shared flash memory
* @param node_id
* @return
******************************************************************************/
_CRITICAL void LuosHAL_SaveNodeID(uint16_t node_id)
{
}

/******************************************************************************
* @brief Software reboot the microprocessor
* @param None
* @return
******************************************************************************/
void LuosHAL_Reboot(void)
{
}

#ifdef BOOTLOADER
/******************************************************************************
* @brief Get node id saved in flash memory
* @param Address
* @return node_id
******************************************************************************/
uint16_t LuosHAL_GetNodeID(void)
{
}

/******************************************************************************
* @brief Programm flash memory
* @param address : Start address
* @param size :: Data size
* @param data : Pointer to data
* @return
******************************************************************************/
void LuosHAL_ProgramFlash(uint32_t address, uint8_t page, uint16_t size, uint8_t *data)
{
}

/******************************************************************************
* @brief DeInit Bootloader peripherals
* @param None
* @return
******************************************************************************/
void LuosHAL_DeInit(void)
{
}

/******************************************************************************
* @brief DeInit Bootloader peripherals
* @param None
* @return
******************************************************************************/
typedef void (*pFunction)(void); /*!< Function pointer definition */

void LuosHAL_JumpToApp(uint32_t app_addr)
{
}

/******************************************************************************
* @brief Return bootloader mode saved in flash
* @param None
* @return
******************************************************************************/
uint8_t LuosHAL_GetMode(void)
{
}
#endif
Loading

0 comments on commit f8142c1

Please sign in to comment.