Skip to content

Commit

Permalink
Merge pull request #83 from TheThingsIndustries/feature/bsp-rename
Browse files Browse the repository at this point in the history
all: Update BSP lib naming to GNSE
  • Loading branch information
elsalahy committed Nov 27, 2020
2 parents 86c5af2 + 31b6183 commit e6381da
Show file tree
Hide file tree
Showing 56 changed files with 696 additions and 696 deletions.
12 changes: 6 additions & 6 deletions Software/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# STNODE Software
# GNSE Software
The software uses `CMAKE` and `arm-none-eabi-gcc` toolchain with the ST SOC `STM32WLxx`

## Structure
Expand All @@ -17,7 +17,7 @@ The software uses `CMAKE` and `arm-none-eabi-gcc` toolchain with the ST SOC `STM
## Set-up
1. Clone project & checkout `develop` branch
```
$ git clone --branch develop --recurse-submodules https://github.com/TheThingsIndustries/st-node.git
$ git clone --branch develop --recurse-submodules https://github.com/TheThingsIndustries/generic-node-se.git
```
2. Set `TOOLCHAIN_PREFIX` in [cross.cmake](./cross.cmake)
3. Install [MinGW](http://mingw.org) for Windows environment and make sure `mingw32-make.exe` can be used from cmd (as a recognized command)
Expand All @@ -28,7 +28,7 @@ $ git clone --branch develop --recurse-submodules https://github.com/TheThingsIn

### Debug build commands
```
$ cd st-node/Software/
$ cd generic-node-se/Software/
$ mkdir -p build/debug
Expand All @@ -40,7 +40,7 @@ $ make
```
### Release build commands
```
$ cd st-node/Software/
$ cd generic-node-se/Software/
$ mkdir -p build/release
Expand All @@ -55,7 +55,7 @@ $ make

### Debug build commands
```
$ cd st-node\Software\
$ cd generic-node-se\Software\
$ mkdir build\debug
Expand All @@ -68,7 +68,7 @@ $ mingw32-make.exe

### Release build commands
```
$ cd st-node\Software\
$ cd generic-node-se\Software\
$ mkdir build\release
Expand Down
6 changes: 3 additions & 3 deletions Software/app/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* @file app.h
* @brief Common file for STNODE applications
* @brief Common file for GNSE applications
*
* @copyright Copyright (c) 2020 The Things Industries B.V.
*
Expand All @@ -33,9 +33,9 @@
#include "stm32_systime.h"

/**
* STNODE Libraries
* GNSE Libraries
*/
#include "STNODE_bsp.h"
#include "GNSE_bsp.h"
#include "SHTC3.h"
#include "MX25R16.h"
#include "LIS2DH12.h"
Expand Down
4 changes: 2 additions & 2 deletions Software/app/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
file(GLOB MAIN_SRC
"${PROJECT_SOURCE_DIR}/app/basic/*.c"
"${PROJECT_SOURCE_DIR}/target/*.c"
"${PROJECT_SOURCE_DIR}/lib/STNODE_BSP/*.c"
"${PROJECT_SOURCE_DIR}/lib/GNSE_BSP/*.c"
"${PROJECT_SOURCE_DIR}/lib/Utilities/*.c"
"${PROJECT_SOURCE_DIR}/lib/SHTC3/*.c"
"${PROJECT_SOURCE_DIR}/lib/MX25R1635/*.c"
Expand Down Expand Up @@ -32,7 +32,7 @@ target_include_directories(${PROJECT_NAME}.elf
${PROJECT_SOURCE_DIR}/app
${PROJECT_SOURCE_DIR}/app/basic
${PROJECT_SOURCE_DIR}/app/basic/conf
${PROJECT_SOURCE_DIR}/lib/STNODE_BSP
${PROJECT_SOURCE_DIR}/lib/GNSE_BSP
${PROJECT_SOURCE_DIR}/lib/Utilities
${PROJECT_SOURCE_DIR}/lib/SHTC3
${PROJECT_SOURCE_DIR}/lib/MX25R1635
Expand Down
12 changes: 6 additions & 6 deletions Software/app/basic/basic_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@

void led_toggle(uint8_t n_toggles, uint32_t toggle_delay)
{
STNODE_BSP_LED_Init(LED_BLUE);
STNODE_BSP_LED_Init(LED_RED);
GNSE_BSP_LED_Init(LED_BLUE);
GNSE_BSP_LED_Init(LED_RED);
APP_PPRINTF("\r\n Toggling LED lights \r\n");
for (size_t counter = 0; counter < n_toggles; counter++)
{
STNODE_BSP_LED_Toggle(LED_BLUE);
GNSE_BSP_LED_Toggle(LED_BLUE);
HAL_Delay(toggle_delay);
STNODE_BSP_LED_Toggle(LED_RED);
GNSE_BSP_LED_Toggle(LED_RED);
HAL_Delay(toggle_delay);
}
STNODE_BSP_LED_Off(LED_BLUE);
STNODE_BSP_LED_Off(LED_RED);
GNSE_BSP_LED_Off(LED_BLUE);
GNSE_BSP_LED_Off(LED_RED);
}

void buzzer_play(uint8_t n_plays, uint32_t play_delay)
Expand Down
2 changes: 1 addition & 1 deletion Software/app/basic/conf/app_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* @file app_conf.h
* @brief Common configuration file for STNODE applications
* @brief Common configuration file for GNSE applications
*
* @copyright Copyright (c) 2020 The Things Industries B.V.
*
Expand Down
24 changes: 12 additions & 12 deletions Software/app/basic/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,39 @@ int main(void)
UTIL_ADV_TRACE_StartRxProcess(uart_rxcallback);
UTIL_ADV_TRACE_SetVerboseLevel(VLEVEL_H);

APP_PPRINTF("\r\n -------------- Starting STNODE basic app -------------- \r\n");
APP_PPRINTF("\r\n -------------- Starting GNSE basic app -------------- \r\n");

APP_PPRINTF("\r\n Testing LED functionality \r\n");
led_toggle(NUMBER_LED_TOGGLE, LED_TOGGLE_INTERVAL);

APP_PPRINTF("\r\n Testing secure element functionality \r\n");
APP_PPRINTF("\r\n 1) Enabling LOAD_SWITCH_SECURE_ELEMENT \r\n");
STNODE_BSP_LS_Init(LOAD_SWITCH_SECURE_ELEMENT);
STNODE_BSP_LS_On(LOAD_SWITCH_SECURE_ELEMENT);
GNSE_BSP_LS_Init(LOAD_SWITCH_SECURE_ELEMENT);
GNSE_BSP_LS_On(LOAD_SWITCH_SECURE_ELEMENT);
HAL_Delay(100);

STNODE_BSP_SEC_ELM_I2C2_Init();
GNSE_BSP_SEC_ELM_I2C2_Init();
HAL_Delay(100);

APP_PPRINTF("\r\n 2) Attempting to read secure element serial number \r\n");
secure_element_read_info();

APP_PPRINTF("\r\n Testing on board sensors functionality \r\n");
APP_PPRINTF("\r\n 1) Enabling LOAD_SWITCH_SENSORS \r\n");
STNODE_BSP_LS_Init(LOAD_SWITCH_SENSORS);
STNODE_BSP_LS_On(LOAD_SWITCH_SENSORS);
GNSE_BSP_LS_Init(LOAD_SWITCH_SENSORS);
GNSE_BSP_LS_On(LOAD_SWITCH_SENSORS);
HAL_Delay(100);

STNODE_BSP_Sensor_I2C1_Init();
GNSE_BSP_Sensor_I2C1_Init();

APP_PPRINTF("\r\n 2) Attempting to read sensors data \r\n");
tempreture_sensor_read_data_polling(NUMBER_TEMPRETURE_SENSOR_READ, TEMPRETURE_SENSOR_READ_INTERVAL);
accelerometer_read_data_polling(NUMBER_ACCLEROMETER_READ, ACCELEROMETER_READ_INTERVAL);

APP_PPRINTF("\r\n Testing on board external flash functionality \r\n");
APP_PPRINTF("\r\n 1) Enabling LOAD_SWITCH_FLASH \r\n");
STNODE_BSP_LS_Init(LOAD_SWITCH_FLASH);
STNODE_BSP_LS_On(LOAD_SWITCH_FLASH);
GNSE_BSP_LS_Init(LOAD_SWITCH_FLASH);
GNSE_BSP_LS_On(LOAD_SWITCH_FLASH);
HAL_Delay(100);

APP_PPRINTF("\r\n 2) Attempting to read & write to external flash \r\n");
Expand All @@ -88,12 +88,12 @@ int main(void)
APP_PPRINTF("\r\n Testing Buzzer functionality \r\n");
buzzer_play(NUMBER_BUZZER_PLAY, BUZZER_PLAY_INTERVAL);

APP_PPRINTF("\r\n -------------- Finished STNODE basic app -------------- \r\n");
APP_PPRINTF("\r\n -------------- Finished GNSE basic app -------------- \r\n");
while (1)
{
STNODE_BSP_LED_Toggle(LED_BLUE);
GNSE_BSP_LED_Toggle(LED_BLUE);
HAL_Delay(100);
STNODE_BSP_LED_Toggle(LED_RED);
GNSE_BSP_LED_Toggle(LED_RED);
HAL_Delay(100);
}
return 0;
Expand Down
8 changes: 4 additions & 4 deletions Software/app/basic/stm32wlxx_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* USER CODE END Header */

/* Includes ------------------------------------------------------------------*/
#include "STNODE_BSP.h"
#include "GNSE_BSP.h"
#include "stm32wlxx_it.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
Expand Down Expand Up @@ -174,17 +174,17 @@ void SysTick_Handler(void)

void USART2_IRQHandler(void)
{
HAL_UART_IRQHandler(&STNODE_BSP_debug_usart);
HAL_UART_IRQHandler(&GNSE_BSP_debug_usart);
}

void DMA1_Channel5_IRQHandler(void)
{
HAL_DMA_IRQHandler(&STNODE_BSP_hdma_tx);
HAL_DMA_IRQHandler(&GNSE_BSP_hdma_tx);
}

void TIM2_IRQHandler(void)
{
HAL_TIM_IRQHandler(&STNODE_BSP_buzzer_timer);
HAL_TIM_IRQHandler(&GNSE_BSP_buzzer_timer);
}

/* USER CODE END 1 */
Expand Down
4 changes: 2 additions & 2 deletions Software/app/basic_bootloader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
file(GLOB MAIN_SRC
"${PROJECT_SOURCE_DIR}/app/basic_bootloader/*.c"
"${PROJECT_SOURCE_DIR}/target/*.c"
"${PROJECT_SOURCE_DIR}/lib/STNODE_BSP/*.c"
"${PROJECT_SOURCE_DIR}/lib/GNSE_BSP/*.c"
"${PROJECT_SOURCE_DIR}/lib/MCU_FLASH/*.c"
"${PROJECT_SOURCE_DIR}/lib/Utilities/*.c"
"${PROJECT_SOURCE_DIR}/lib/SHTC3/*.c"
Expand All @@ -24,7 +24,7 @@ target_include_directories(${PROJECT_NAME}.elf
${PROJECT_SOURCE_DIR}/app
${PROJECT_SOURCE_DIR}/app/basic_bootloader
${PROJECT_SOURCE_DIR}/app/basic_bootloader/conf
${PROJECT_SOURCE_DIR}/lib/STNODE_BSP
${PROJECT_SOURCE_DIR}/lib/GNSE_BSP
${PROJECT_SOURCE_DIR}/lib/MCU_FLASH
${PROJECT_SOURCE_DIR}/lib/Utilities
${PROJECT_SOURCE_DIR}/lib/SHTC3
Expand Down
24 changes: 12 additions & 12 deletions Software/app/basic_bootloader/bootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ uint8_t Bootloader_Init(void)
ret = BL_OP_SUCCESS;
}

STNODE_BSP_PB_Init(BUTTON_SW1, BUTTON_MODE_GPIO);
GNSE_BSP_PB_Init(BUTTON_SW1, BUTTON_MODE_GPIO);

#if (BOOTLOADER_LED_FEEDBACK)
STNODE_BSP_LED_Init(LED_RED);
STNODE_BSP_LED_Init(LED_BLUE);
GNSE_BSP_LED_Init(LED_RED);
GNSE_BSP_LED_Init(LED_BLUE);
#endif

return ret;
Expand All @@ -66,8 +66,8 @@ uint8_t Bootloader_DeInit(void)
{

#if (BOOTLOADER_LED_FEEDBACK)
STNODE_BSP_LED_DeInit(LED_RED);
STNODE_BSP_LED_DeInit(LED_BLUE);
GNSE_BSP_LED_DeInit(LED_RED);
GNSE_BSP_LED_DeInit(LED_BLUE);
#endif

return BL_OP_SUCCESS;
Expand Down Expand Up @@ -96,7 +96,7 @@ void Bootloader_HandleInput(void)
uint8_t button_counter = 0;

#if (BOOTLOADER_LED_FEEDBACK)
STNODE_BSP_LED_On(LED_RED);
GNSE_BSP_LED_On(LED_RED);
HAL_Delay(BOOTLOADER_LED_DELAY);
#endif

Expand All @@ -110,25 +110,25 @@ void Bootloader_HandleInput(void)
#if (BOOTLOADER_LED_FEEDBACK)
if (button_counter < BOOTLOADER_BTN_SYS_JMP_WAIT)
{
STNODE_BSP_LED_Toggle(LED_RED);
GNSE_BSP_LED_Toggle(LED_RED);
}
else if (button_counter == BOOTLOADER_BTN_SYS_JMP_WAIT)
{
STNODE_BSP_LED_Off(LED_RED);
STNODE_BSP_LED_On(LED_BLUE);
GNSE_BSP_LED_Off(LED_RED);
GNSE_BSP_LED_On(LED_BLUE);
}
else
{
STNODE_BSP_LED_Toggle(LED_BLUE);
GNSE_BSP_LED_Toggle(LED_BLUE);
}
#endif

button_counter++;
HAL_Delay(BOOTLOADER_BTN_SAMPLE_DELAY);
}
#if (BOOTLOADER_LED_FEEDBACK)
STNODE_BSP_LED_Off(LED_RED);
STNODE_BSP_LED_Off(LED_BLUE);
GNSE_BSP_LED_Off(LED_RED);
GNSE_BSP_LED_Off(LED_BLUE);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion Software/app/basic_bootloader/conf/app_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* @file app_conf.h
* @brief Common configuration file for STNODE applications
* @brief Common configuration file for GNSE applications
*
* @copyright Copyright (c) 2020 The Things Industries B.V.
*
Expand Down
2 changes: 1 addition & 1 deletion Software/app/basic_bootloader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int main(void)
UTIL_ADV_TRACE_SetVerboseLevel(VLEVEL_H);
#endif

APP_PPRINTF("\r\n -------------- Starting STNODE basic bootloader -------------- \r\n");
APP_PPRINTF("\r\n -------------- Starting GNSE basic bootloader -------------- \r\n");
Bootloader_Init();
Bootloader_HandleInput();

Expand Down
6 changes: 3 additions & 3 deletions Software/app/basic_bootloader/stm32wlxx_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* USER CODE END Header */

/* Includes ------------------------------------------------------------------*/
#include "STNODE_BSP.h"
#include "GNSE_BSP.h"
#include "stm32wlxx_it.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
Expand Down Expand Up @@ -174,12 +174,12 @@ void SysTick_Handler(void)

void USART2_IRQHandler(void)
{
HAL_UART_IRQHandler(&STNODE_BSP_debug_usart);
HAL_UART_IRQHandler(&GNSE_BSP_debug_usart);
}

void DMA1_Channel5_IRQHandler(void)
{
HAL_DMA_IRQHandler(&STNODE_BSP_hdma_tx);
HAL_DMA_IRQHandler(&GNSE_BSP_hdma_tx);
}

/* USER CODE END 1 */
Expand Down
4 changes: 2 additions & 2 deletions Software/app/basic_freertos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ file(GLOB MAIN_SRC
"${PROJECT_SOURCE_DIR}/app/basic_freertos/*.c"
"${PROJECT_SOURCE_DIR}/target/*.c"
"${PROJECT_SOURCE_DIR}/target/FreeRTOS_CMSIS/*.c"
"${PROJECT_SOURCE_DIR}/lib/STNODE_BSP/*.c"
"${PROJECT_SOURCE_DIR}/lib/GNSE_BSP/*.c"
"${PROJECT_SOURCE_DIR}/lib/MCU_FLASH/*.c"
"${PROJECT_SOURCE_DIR}/lib/Utilities/*.c"
"${PROJECT_SOURCE_DIR}/lib/SHTC3/*.c"
Expand All @@ -30,7 +30,7 @@ target_include_directories(${PROJECT_NAME}.elf
${PROJECT_SOURCE_DIR}/app
${PROJECT_SOURCE_DIR}/app/basic_freertos
${PROJECT_SOURCE_DIR}/app/basic_freertos/conf
${PROJECT_SOURCE_DIR}/lib/STNODE_BSP
${PROJECT_SOURCE_DIR}/lib/GNSE_BSP
${PROJECT_SOURCE_DIR}/lib/MCU_FLASH
${PROJECT_SOURCE_DIR}/lib/Utilities
${PROJECT_SOURCE_DIR}/lib/SHTC3
Expand Down
2 changes: 1 addition & 1 deletion Software/app/basic_freertos/app_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* Includes ------------------------------------------------------------------*/
#include "FreeRTOS.h"
#include "task.h"
#include "STNODE_bsp.h"
#include "GNSE_bsp.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
Expand Down
2 changes: 1 addition & 1 deletion Software/app/basic_freertos/conf/app_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* @file app_conf.h
* @brief Common configuration file for STNODE applications
* @brief Common configuration file for GNSE applications
*
* @copyright Copyright (c) 2020 The Things Industries B.V.
*
Expand Down
Loading

0 comments on commit e6381da

Please sign in to comment.