Skip to content

Commit c1c8056

Browse files
committed
misc: bump to version 1.0.7
This is a important release for platform-nuclei. * It now change to use Nuclei SDK 0.2.5 version * The gnu toolchain and openocd are changed to use latest 2020.08 release from Nuclei Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent 33a6388 commit c1c8056

4 files changed

Lines changed: 32 additions & 64 deletions

File tree

examples/freertos_demo/src/main.c

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* Copyright 2019-2020 Nuclei, Inc */
21
/*
32
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
43
All rights reserved
@@ -75,41 +74,30 @@
7574
#include "task.h" /* RTOS task related API prototypes. */
7675
#include "timers.h" /* Software timer related API prototypes. */
7776

78-
/* TODO Add any manufacture supplied header files can be included
79-
here. */
8077
#include <stdio.h>
8178
#include <stdlib.h>
8279
#include <unistd.h>
8380

8481
#include "nuclei_sdk_soc.h"
8582

86-
#define mainQUEUE_RECEIVE_TASK_PRIORITY (tskIDLE_PRIORITY + 2)
87-
#define mainQUEUE_SEND_TASK_PRIORITY (tskIDLE_PRIORITY + 1)
88-
#define mainEVENT_SEMAPHORE_TASK_PRIORITY (configMAX_PRIORITIES - 1)
89-
90-
#define NBIT_DEFAULT 3
91-
#define REG_LEN 8
92-
9383
/* The period of the example software timer, specified in milliseconds, and
9484
converted to ticks using the pdMS_TO_TICKS() macro. */
95-
#define mainSOFTWARE_TIMER_PERIOD_MS pdMS_TO_TICKS(1000)
85+
#define mainSOFTWARE_TIMER_PERIOD_MS pdMS_TO_TICKS(1000)
86+
#define mainQUEUE_LENGTH (1)
9687

97-
#define mainQUEUE_LENGTH (1)
9888
static void prvSetupHardware(void);
9989
extern void idle_task(void);
10090
static void vExampleTimerCallback(TimerHandle_t xTimer);
10191

10292
/* The queue used by the queue send and queue receive tasks. */
10393
static QueueHandle_t xQueue = NULL;
10494

105-
void prvSetupHardware(void)
106-
{
107-
}
95+
static TaskHandle_t StartTask1_Handler;
96+
static TaskHandle_t StartTask2_Handler;
10897

109-
TaskHandle_t StartTask_Handler;
110-
TaskHandle_t StartTask2_Handler;
98+
void prvSetupHardware(void) {}
11199

112-
void start_task(void *pvParameters);
100+
void start_task1(void *pvParameters);
113101
void start_task2(void *pvParameters);
114102

115103
int main(void)
@@ -126,11 +114,12 @@ int main(void)
126114
sizeof(uint32_t));
127115

128116
if (xQueue == NULL) {
129-
for (;;) ;
117+
for (;;)
118+
;
130119
}
131-
xTaskCreate((TaskFunction_t)start_task, (const char *)"start_task",
120+
xTaskCreate((TaskFunction_t)start_task1, (const char *)"start_task1",
132121
(uint16_t)256, (void *)NULL, (UBaseType_t)2,
133-
(TaskHandle_t *)&StartTask_Handler);
122+
(TaskHandle_t *)&StartTask1_Handler);
134123

135124
xTaskCreate((TaskFunction_t)start_task2, (const char *)"start_task2",
136125
(uint16_t)256, (void *)NULL, (UBaseType_t)1,
@@ -153,27 +142,22 @@ int main(void)
153142
};
154143
}
155144

156-
void start_task(void *pvParameters)
145+
void start_task1(void *pvParameters)
157146
{
158-
TickType_t xNextWakeTime;
159-
int x;
160-
printf("task_1\r\n");
147+
int cnt = 0;
148+
printf("Enter to task_1\r\n");
161149
while (1) {
162-
printf("task1_running..... \r\n");
163-
150+
printf("task1 is running %d.....\r\n", cnt++);
164151
vTaskDelay(200);
165152
}
166153
}
167154

168155
void start_task2(void *pvParameters)
169156
{
170-
uint32_t ulReceivedValue;
171-
printf("task_2\r\n");
172-
/* Initialise xNextWakeTime - this only needs to be done once. */
173-
157+
int cnt = 0;
158+
printf("Enter to task_2\r\n");
174159
while (1) {
175-
printf("task2_running..... \r\n");
176-
160+
printf("task2 is running %d.....\r\n", cnt++);
177161
vTaskDelay(200);
178162
}
179163
}
@@ -183,21 +167,19 @@ static void vExampleTimerCallback(TimerHandle_t xTimer)
183167
/* The timer has expired. Count the number of times this happens. The
184168
timer that calls this function is an auto re-load timer, so it will
185169
execute periodically. */
186-
187-
printf("timers Callback\r\n");
170+
static int cnt = 0;
171+
printf("timers Callback %d\r\n", cnt++);
188172
}
189173

190174
void vApplicationTickHook(void)
191175
{
192-
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
193-
static uint32_t ulCount = 0;
176+
// BaseType_t xHigherPriorityTaskWoken = pdFALSE;
194177

195178
/* The RTOS tick hook function is enabled by setting configUSE_TICK_HOOK to
196179
1 in FreeRTOSConfig.h.
197180
198181
"Give" the semaphore on every 500th tick interrupt. */
199182

200-
201183
/* If xHigherPriorityTaskWoken is pdTRUE then a context switch should
202184
normally be performed before leaving the interrupt (because during the
203185
execution of the interrupt a task of equal or higher priority than the
@@ -229,9 +211,6 @@ void vApplicationMallocFailedHook(void)
229211

230212
void vApplicationStackOverflowHook(TaskHandle_t xTask, signed char *pcTaskName)
231213
{
232-
// ( void ) pcTaskName;
233-
// ( void ) xTask;
234-
235214
/* Run time stack overflow checking is performed if
236215
configconfigCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
237216
function is called if a stack overflow is detected. pxCurrentTCB can be
@@ -246,7 +225,7 @@ void vApplicationStackOverflowHook(TaskHandle_t xTask, signed char *pcTaskName)
246225
extern UBaseType_t uxCriticalNesting;
247226
void vApplicationIdleHook(void)
248227
{
249-
volatile size_t xFreeStackSpace;
228+
// volatile size_t xFreeStackSpace;
250229
/* The idle task hook is enabled by setting configUSE_IDLE_HOOK to 1 in
251230
FreeRTOSConfig.h.
252231
Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/* Copyright 2019 Nuclei, Inc */
2-
/* SPDX-License-Identifier: Apache-2.0 */
3-
1+
// See LICENSE for license details.
42
#include <stdio.h>
53
#include <time.h>
64
#include <stdlib.h>
@@ -91,21 +89,10 @@ int main(void)
9189
printf("MISA: 0x%lx\r\n", misa);
9290
print_misa();
9391

94-
printf("Hello World!\r\n");
95-
printf("Hello World!\r\n");
96-
printf("Hello World!\r\n");
97-
printf("Hello World!\r\n");
98-
printf("Hello World!\r\n");
99-
printf("Hello World!\r\n");
100-
printf("Hello World!\r\n");
101-
printf("Hello World!\r\n");
102-
printf("Hello World!\r\n");
103-
printf("Hello World!\r\n");
104-
printf("Hello World!\r\n");
105-
printf("Hello World!\r\n");
106-
printf("Hello World!\r\n");
107-
printf("Hello World!\r\n");
108-
printf("Hello World!\r\n");
92+
for (int i = 0; i < 20; i ++) {
93+
printf("%d: Hello World From Nuclei RISC-V Processor!\r\n", i);
94+
}
95+
10996
return 0;
11097
}
11198

examples/rtthread_demo/platformio.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ board_build.rtos = rtthread
2121
[env:nuclei-hbird_eval]
2222
board = hbird_eval
2323
board_build.download = flash
24+
board_build.core = nx600
25+
2426

2527
[env:nuclei-gd32vf103v_rvstar]
2628
board = gd32vf103v_rvstar

platform.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"type": "git",
1212
"url": "https://github.com/Nuclei-Software/platform-nuclei.git"
1313
},
14-
"version": "1.0.6",
14+
"version": "1.0.7",
1515
"packageRepositories": [
1616
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1717
"http://dl.platformio.org/packages/manifest.json",
@@ -29,17 +29,17 @@
2929
"packages": {
3030
"toolchain-riscv-gcc-nuclei": {
3131
"type": "toolchain",
32-
"version": "~9.2.0"
32+
"version": "~9.2.1"
3333
},
3434
"framework-nuclei-sdk": {
3535
"optional": true,
3636
"type": "framework",
37-
"version": "~0.2.4"
37+
"version": "~0.2.5"
3838
},
3939
"tool-openocd-nuclei": {
4040
"optional": true,
4141
"type": "uploader",
42-
"version": "~0.10.0"
42+
"version": "~0.10.1"
4343
},
4444
"tool-jlink": {
4545
"type": "uploader",

0 commit comments

Comments
 (0)