Skip to content

Commit

Permalink
Renesas RSK-RX65N-2MB support
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwinter authored Jan 11, 2021
1 parent 3fe16e5 commit 7c0d9df
Show file tree
Hide file tree
Showing 164 changed files with 66,272 additions and 100 deletions.
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"marus25.cortex-debug",
"vsciot-vscode.vscode-iot-workbench",
"vsciot-vscode.vscode-dtdl",
"xaver.clang-format",
"ms-azuretools.vscode-docker"
Expand Down
2 changes: 1 addition & 1 deletion MXChip/AZ3166/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(CMAKE_C_STANDARD 99)

set(GSG_BASE_DIR ${CMAKE_SOURCE_DIR}/../..)
Expand Down
18 changes: 9 additions & 9 deletions MXChip/AZ3166/app/wwd_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
&nx_pool[0], "NetX Main TX Packet Pool", SAMPLE_PACKET_SIZE, sample_tx_pool_stack, SAMPLE_TX_POOL_SIZE);
if (status != NX_SUCCESS)
{
printf("Sample platform initialize fail: PACKET POOL CREATE FAIL.");
printf("Platform initialize fail: PACKET POOL CREATE FAIL.");
return status;
}

Expand All @@ -204,7 +204,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
if (status != NX_SUCCESS)
{
nx_packet_pool_delete(&nx_pool[0]);
printf("Sample platform initialize fail: PACKET POOL CREATE FAIL.\r\n");
printf("Platform initialize fail: PACKET POOL CREATE FAIL.\r\n");
return status;
}

Expand All @@ -214,7 +214,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
{
nx_packet_pool_delete(&nx_pool[0]);
nx_packet_pool_delete(&nx_pool[1]);
printf("Sample platform initialize fail: WiFi JOIN FAIL.\r\n");
printf("Platform initialize fail: WiFi JOIN FAIL.\r\n");
return status;
}

Expand All @@ -233,7 +233,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
{
nx_packet_pool_delete(&nx_pool[0]);
nx_packet_pool_delete(&nx_pool[1]);
printf("Sample platform initialize fail: IP CREATE FAIL.\r\n");
printf("Platform initialize fail: IP CREATE FAIL.\r\n");
return status;
}

Expand All @@ -244,7 +244,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
nx_ip_delete(&nx_ip);
nx_packet_pool_delete(&nx_pool[0]);
nx_packet_pool_delete(&nx_pool[1]);
printf("Sample platform initialize fail: ARP ENABLE FAIL.\r\n");
printf("Platform initialize fail: ARP ENABLE FAIL.\r\n");
return status;
}

Expand All @@ -255,7 +255,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
nx_ip_delete(&nx_ip);
nx_packet_pool_delete(&nx_pool[0]);
nx_packet_pool_delete(&nx_pool[1]);
printf("Sample platform initialize fail: ICMP ENABLE FAIL.\r\n");
printf("Platform initialize fail: ICMP ENABLE FAIL.\r\n");
return status;
}

Expand All @@ -267,7 +267,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
nx_packet_pool_delete(&nx_pool[0]);
nx_packet_pool_delete(&nx_pool[1]);
/* LogError */
printf("Sample platform initialize fail: TCP ENABLE FAIL.\r\n");
printf("Platform initialize fail: TCP ENABLE FAIL.\r\n");
return status;
}

Expand All @@ -278,7 +278,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
nx_ip_delete(&nx_ip);
nx_packet_pool_delete(&nx_pool[0]);
nx_packet_pool_delete(&nx_pool[1]);
printf("Sample platform initialize fail: UDP ENABLE FAIL.\r\n");
printf("Platform initialize fail: UDP ENABLE FAIL.\r\n");
return status;
}

Expand All @@ -292,7 +292,7 @@ int platform_init(CHAR* ssid, CHAR* password, WiFi_Mode mode)
nx_ip_delete(&nx_ip);
nx_packet_pool_delete(&nx_pool[0]);
nx_packet_pool_delete(&nx_pool[1]);
printf("Sample platform initialize fail: %u\r\n", status);
printf("Platform initialize fail: %u\r\n", status);
return status;
}

Expand Down
2 changes: 1 addition & 1 deletion MXChip/AZ3166/lib/wiced_sdk/binary_build/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.13)

project(wiced_sdk C)

Expand Down
7 changes: 3 additions & 4 deletions MXChip/AZ3166/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,10 @@ To use Azure CLI to call a method:
1. View the Termite terminal to confirm the output messages:

```output
Received direct method=setLedState, id=1, message=true
Received direct method call: setLedState
Payload: true
LED is turned ON
Sending device twin update with bool value
Sending message {"ledState":true}
Direct method=setLedState invoked
Device twin property sent: {"ledState":true}
```

## Debugging
Expand Down
2 changes: 1 addition & 1 deletion Microchip/ATSAME54-XPRO/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(CMAKE_C_STANDARD 99)

set(GSG_BASE_DIR ${CMAKE_SOURCE_DIR}/../..)
Expand Down
14 changes: 5 additions & 9 deletions Microchip/ATSAME54-XPRO/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ To install the tools:

To install the remaining tools:

1. Install [Atmel Studio 7](https://www.microchip.com/mplab/avr-support/atmel-studio-7). Atmel Studio is a device development environment that includes the tools to program and flash program the Microchip E54. For this tutorial, you use Atmel Studio only to flash the Microchip E54. The installation takes several minutes, and prompts you several times to approve the installation of components.
1. Install [Atmel Studio 7](https://www.microchip.com/mplab/avr-support/atmel-studio-7). Atmel Studio is a device development environment that includes the tools to program and flash the Microchip E54. For this tutorial, you use Atmel Studio only to flash the Microchip E54. The installation takes several minutes, and prompts you several times to approve the installation of components.

### Create an IoT hub

Expand Down Expand Up @@ -232,10 +232,6 @@ You can use the **Termite** utility to monitor communication and confirm that yo
```output
Starting Azure thread
Initializing WiFi
Connecting to SSID 'iot'
SUCCESS: WiFi connected to iot
Initializing DHCP
IP address: 10.0.0.123
Mask: 255.255.255.0
Expand Down Expand Up @@ -388,12 +384,12 @@ To use Azure CLI to call a method:
1. View the Termite terminal to confirm the output messages:
```output
Received direct method=setLedState, id=1, message=true
Received direct method call: setLedState
Payload: true
LED is turned ON
Sending device twin update with bool value
Sending message {"ledState":true}
Direct method=setLedState invoked
Device twin property sent: {"ledState":true}
```
## Debugging
For debugging the application, see [Debugging with Visual Studio Code](../../docs/debugging.md).
Expand Down
3 changes: 1 addition & 2 deletions NXP/MIMXRT1050-EVKB/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(CMAKE_C_STANDARD 99)

set(GSG_BASE_DIR ${CMAKE_SOURCE_DIR}/../..)
Expand All @@ -26,4 +26,3 @@ project(mimxrt1050_azure_iot C ASM)
add_subdirectory(${CORE_SRC_DIR} core_src)
add_subdirectory(lib)
add_subdirectory(app)

2 changes: 0 additions & 2 deletions NXP/MIMXRT1050-EVKB/app/board_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#ifndef _BOARD_INIT_H
#define _BOARD_INIT_H

#include "nx_api.h"

void board_init();

#endif // _BOARD_INIT_H
11 changes: 3 additions & 8 deletions NXP/MIMXRT1050-EVKB/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ You can use the **Termite** utility to monitor communication and confirm that yo
```output
Starting Azure thread
Initializing WiFi
Connecting to SSID 'iot'
SUCCESS: WiFi connected to iot
Initializing DHCP
IP address: 10.0.0.123
Mask: 255.255.255.0
Expand Down Expand Up @@ -347,11 +343,10 @@ To use Azure CLI to call a method:
1. View the Termite terminal to confirm the output messages:

```output
Received direct method=setLedState, id=1, message=true
Received direct method call: setLedState
Payload: true
LED is turned ON
Sending device twin update with bool value
Sending message {"ledState":true}
Direct method=setLedState invoked
Device twin property sent: {"ledState":true}
```

## Debugging
Expand Down
2 changes: 1 addition & 1 deletion NXP/MIMXRT1060-EVK/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(CMAKE_C_STANDARD 99)

set(GSG_BASE_DIR ${CMAKE_SOURCE_DIR}/../..)
Expand Down
2 changes: 0 additions & 2 deletions NXP/MIMXRT1060-EVK/app/board_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#ifndef _BOARD_INIT_H
#define _BOARD_INIT_H

#include "nx_api.h"

void board_init();

#endif // _BOARD_INIT_H
11 changes: 3 additions & 8 deletions NXP/MIMXRT1060-EVK/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ You can use the **Termite** utility to monitor communication and confirm that yo
```output
Starting Azure thread
Initializing WiFi
Connecting to SSID 'iot'
SUCCESS: WiFi connected to iot
Initializing DHCP
IP address: 10.0.0.123
Mask: 255.255.255.0
Expand Down Expand Up @@ -347,11 +343,10 @@ To use Azure CLI to call a method:
1. View the Termite terminal to confirm the output messages:

```output
Received direct method=setLedState, id=1, message=true
Received direct method call: setLedState
Payload: true
LED is turned ON
Sending device twin update with bool value
Sending message {"ledState":true}
Direct method=setLedState invoked
Device twin property sent: {"ledState":true}
```

## Debugging
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The following board specific guides will get you started with Azure RTOS and Azu
* [MIMXRT1060-EVK](NXP/MIMXRT1060-EVK)
* Renesas:
* [AE-Cloud2](Renesas/Synergy)
* [RSK+RX65N-2MB](Renesas/RSK_RX65N_2MB)
* STMicroelectronics:
* [B-L475E-IOT01A](STMicroelectronics/STM32L4_L4+)
* [B-L4S5I-IOT01A](STMicroelectronics/STM32L4_L4+)
Expand Down
6 changes: 6 additions & 0 deletions Renesas/RSK_RX65N_2MB/.vscode/cmake-kits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"name": "Renesas RX65N GCC",
"toolchainFile": "${workspaceFolder}/../../cmake/renesas-rx-gcc-rx65n.cmake"
}
]
30 changes: 30 additions & 0 deletions Renesas/RSK_RX65N_2MB/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(CMAKE_C_STANDARD 99)

set(GSG_BASE_DIR ${CMAKE_SOURCE_DIR}/../..)
set(CORE_SRC_DIR ${GSG_BASE_DIR}/core/src)
set(CORE_LIB_DIR ${GSG_BASE_DIR}/core/lib)

# use the repo version of ninja on Windows as there is no Ninja installer
if(WIN32)
set(CMAKE_MAKE_PROGRAM ${GSG_BASE_DIR}/cmake/ninja CACHE STRING "Ninja location")
endif()

# Set the toolchain if not defined
if(NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${GSG_BASE_DIR}/cmake/renesas-rx-gcc-rx65n.cmake")
endif()

include(${GSG_BASE_DIR}/cmake/utilities.cmake)

# Define the Project
project(rx65n_azure_iot C ASM)

set(DISABLE_NEWLIB_STUB true)

add_subdirectory(${CORE_SRC_DIR} core_src)
add_subdirectory(lib)
add_subdirectory(app)
6 changes: 6 additions & 0 deletions Renesas/RSK_RX65N_2MB/app/.vscode/cmake-kits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"name": "Renesas RX65N GCC",
"toolchainFile": "${workspaceFolder}/../../cmake/renesas-rx-gcc-rx65n.cmake"
}
]
50 changes: 50 additions & 0 deletions Renesas/RSK_RX65N_2MB/app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

set(LINKER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/startup/linker_script.ld")

set(SOURCES
# startup/startup_MIMXRT1062.S
startup/tx_initialize_low_level.S

legacy/mqtt.c
azure_config.h
nx_client.c
board_init.c
console.c
main.c
)

add_executable(${PROJECT_NAME} ${SOURCES})

target_link_libraries(${PROJECT_NAME}
PUBLIC
azrtos::threadx
azrtos::netxduo

app_common
jsmn
rx_driver_package
netx_driver
)

target_link_options(${PROJECT_NAME}
PRIVATE
-T${LINKER_SCRIPT}
-Wl,-Map=${PROJECT_NAME}.map
-Wl,-e_PowerON_Reset
)

set_target_properties(${PROJECT_NAME}
PROPERTIES
LINK_DEPENDS ${LINKER_SCRIPT}
SUFFIX ".elf"
)

target_include_directories(${PROJECT_NAME}
PUBLIC
.
)

create_bin_output(${PROJECT_NAME})
firmware_size(${PROJECT_NAME})
Loading

0 comments on commit 7c0d9df

Please sign in to comment.