Skip to content

Commit

Permalink
Merge pull request #60 from andreock/develop
Browse files Browse the repository at this point in the history
Add RT-Thread support for CH59x
  • Loading branch information
maxgerhardt authored May 31, 2024
2 parents 4d5ba7b + aa46b9e commit c39b31b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 6 deletions.
3 changes: 2 additions & 1 deletion boards/genericCH591D.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"frameworks": [
"noneos-sdk",
"freertos"
"freertos",
"rt-thread"
],
"name": "Generic CH591D",
"upload": {
Expand Down
3 changes: 2 additions & 1 deletion boards/genericCH591F.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"frameworks": [
"noneos-sdk",
"freertos"
"freertos",
"rt-thread"
],
"name": "Generic CH591F",
"upload": {
Expand Down
3 changes: 2 additions & 1 deletion boards/genericCH591R.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"frameworks": [
"noneos-sdk",
"freertos"
"freertos",
"rt-thread"
],
"name": "Generic CH591R",
"upload": {
Expand Down
3 changes: 2 additions & 1 deletion boards/genericCH592F.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"frameworks": [
"noneos-sdk",
"freertos"
"freertos",
"rt-thread"
],
"name": "Generic CH592F",
"upload": {
Expand Down
3 changes: 2 additions & 1 deletion boards/genericCH592X.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"frameworks": [
"noneos-sdk",
"freertos"
"freertos",
"rt-thread"
],
"name": "Generic CH592X",
"upload": {
Expand Down
5 changes: 4 additions & 1 deletion examples/hello-world-rt-thread-ch5xx/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ build_flags = -DDEBUG=1
upload_protocol = isp

[env:genericCH582F]
board = genericCH582F
board = genericCH582F

[env:genericCH592F]
board = genericCH592F
5 changes: 5 additions & 0 deletions examples/hello-world-rt-thread-ch5xx/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
* SPDX-License-Identifier: Apache-2.0
*******************************************************************************/


#if defined(CH58X)
#include "CH58x_common.h"
#elif defined(CH59X)
#include "CH59x_common.h"
#endif
#include <rtthread.h>

ALIGN(RT_ALIGN_SIZE)
Expand Down
1 change: 1 addition & 0 deletions misc/scripts/gen_boarddefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def create_board_json(info: ChipInfo, board_name:str, output_path: str, patch_in
base_json["frameworks"].append("rt-thread")
if chip_l.startswith("ch59"):
base_json["frameworks"].append("freertos")
base_json["frameworks"].append("rt-thread")
if chip_l.startswith("ch32v003"):
base_json["frameworks"].append("arduino")
base_json["build"]["core"] = "ch32v003"
Expand Down

0 comments on commit c39b31b

Please sign in to comment.