0%

My previous blog MaixDuino 1 briefly introduced the fundamental functionalities of MaixDuino. Today, two more functionalities are to be investigated.

1. Binocular

Sipeed provides its official sipeed_gc0328_binocular.ino.

1.1 Verify/Compile

1
Sketch uses 321804 bytes (3%) of program storage space. Maximum is 8388608 bytes.

1.2 Upload Using Programmer (k-flash)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Sketch uses 321804 bytes (3%) of program storage space. Maximum is 8388608 bytes.
[INFO] ANSI colors not used
[INFO] COM Port Selected Manually: /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
*
[INFO] Greeting Message Detected, Start Downloading ISP

Downloading ISP: |---------------------------------------------| 1.5%

Downloading ISP: |=--------------------------------------------| 3.1%

Downloading ISP: |==-------------------------------------------| 4.6%

Downloading ISP: |==-------------------------------------------| 6.2%

Downloading ISP: |===------------------------------------------| 7.7%

Downloading ISP: |====-----------------------------------------| 9.2%

Downloading ISP: |====-----------------------------------------| 10.8%

Downloading ISP: |=====----------------------------------------| 12.3%

Downloading ISP: |======---------------------------------------| 13.8%

Downloading ISP: |======---------------------------------------| 15.4%

Downloading ISP: |=======--------------------------------------| 16.9% 10kiB/s

Downloading ISP: |========-------------------------------------| 18.5% 10kiB/s

Downloading ISP: |=========------------------------------------| 20.0% 10kiB/s

Downloading ISP: |=========------------------------------------| 21.5% 10kiB/s

Downloading ISP: |==========-----------------------------------| 23.1% 10kiB/s

Downloading ISP: |===========----------------------------------| 24.6% 10kiB/s

Downloading ISP: |===========----------------------------------| 26.2% 10kiB/s

Downloading ISP: |============---------------------------------| 27.7% 10kiB/s

Downloading ISP: |=============--------------------------------| 29.2% 10kiB/s

Downloading ISP: |=============--------------------------------| 30.8% 10kiB/s

Downloading ISP: |==============-------------------------------| 32.3% 10kiB/s

Downloading ISP: |===============------------------------------| 33.8% 10kiB/s

Downloading ISP: |===============------------------------------| 35.4% 10kiB/s

Downloading ISP: |================-----------------------------| 36.9% 10kiB/s

Downloading ISP: |=================----------------------------| 38.5% 10kiB/s

Downloading ISP: |==================---------------------------| 40.0% 10kiB/s

Downloading ISP: |==================---------------------------| 41.5% 10kiB/s

Downloading ISP: |===================--------------------------| 43.1% 10kiB/s

Downloading ISP: |====================-------------------------| 44.6% 10kiB/s

Downloading ISP: |====================-------------------------| 46.2% 10kiB/s

Downloading ISP: |=====================------------------------| 47.7% 10kiB/s

Downloading ISP: |======================-----------------------| 49.2% 10kiB/s

Downloading ISP: |======================-----------------------| 50.8% 10kiB/s

Downloading ISP: |=======================----------------------| 52.3% 10kiB/s

Downloading ISP: |========================---------------------| 53.8% 10kiB/s

Downloading ISP: |========================---------------------| 55.4% 10kiB/s

Downloading ISP: |=========================--------------------| 56.9% 10kiB/s

Downloading ISP: |==========================-------------------| 58.5% 10kiB/s

Downloading ISP: |===========================------------------| 60.0% 10kiB/s

Downloading ISP: |===========================------------------| 61.5% 10kiB/s

Downloading ISP: |============================-----------------| 63.1% 10kiB/s

Downloading ISP: |=============================----------------| 64.6% 10kiB/s

Downloading ISP: |=============================----------------| 66.2% 10kiB/s

Downloading ISP: |==============================---------------| 67.7% 10kiB/s

Downloading ISP: |===============================--------------| 69.2% 10kiB/s

Downloading ISP: |===============================--------------| 70.8% 10kiB/s

Downloading ISP: |================================-------------| 72.3% 10kiB/s

Downloading ISP: |=================================------------| 73.8% 10kiB/s

Downloading ISP: |=================================------------| 75.4% 10kiB/s

Downloading ISP: |==================================-----------| 76.9% 10kiB/s

Downloading ISP: |===================================----------| 78.5% 10kiB/s

Downloading ISP: |====================================---------| 80.0% 10kiB/s

Downloading ISP: |====================================---------| 81.5% 10kiB/s

Downloading ISP: |=====================================--------| 83.1% 10kiB/s

Downloading ISP: |======================================-------| 84.6% 10kiB/s

Downloading ISP: |======================================-------| 86.2% 10kiB/s

Downloading ISP: |=======================================------| 87.7% 10kiB/s

Downloading ISP: |========================================-----| 89.2% 10kiB/s

Downloading ISP: |========================================-----| 90.8% 10kiB/s

Downloading ISP: |=========================================----| 92.3% 10kiB/s

Downloading ISP: |==========================================---| 93.8% 10kiB/s

Downloading ISP: |==========================================---| 95.4% 10kiB/s

Downloading ISP: |===========================================--| 96.9% 10kiB/s

Downloading ISP: |============================================-| 98.5% 10kiB/s

Downloading ISP: |=============================================| 100.0% 10kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate: 500000
[INFO] Baudrate changed, greeting with ISP again ...
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash: On-Board
[INFO] Initialization flash Successfully

Programming BIN: |===============------------------------------| 33.3% 29kiB/s

Programming BIN: |==============================---------------| 66.7% 29kiB/s

Programming BIN: |=============================================| 100.0% 28kiB/s
[INFO] Rebooting...

1.3 Demonstration

2. Wifi

Long time no see everybody. Today let's talk about MaixDuino.

1. Introduction

1.1 lsusb

1
2
3
......
Bus 011 Device 055: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
......

1.2 Wiki

Detailed specification about MaixDuino can be found on MaixDuino Wiki.

1.3 Github Source Code

Typically, there's no need to rebuild your project from the ground up. Instead, simply enter the Maixduino package URL in the Additional Boards Manager URLs section.

However, when needed, Maixduino Github repository offers open-source resource that you can utilize as a foundation for further development.

2. Flash

2.1 Environment Configuration

2.2 Flash a Customized Sketch

  • The W cse475 course from the University of Washington provides comprehensive course content, serving as an excellent tutorial for those interested in following along.

  • Highlight: MUST add the following two lines and use Burn Baudo Rate "500 kbps"

1
2
bitm.menu.burn_baudrate.500000=500 kbps
bitm.menu.burn_baudrate.500000.build.burn_baudrate=500000

2.2.1.1 Verify/Compile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/wiring_analog.c: In function 'analogRead':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/wiring_analog.c:104:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'vAddNewTaskToCurrentReadyList':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:1111:26: warning: assignment to 'UBaseType_t' {aka 'long unsigned int'} from 'UBaseType_t *' {aka 'long unsigned int *'} makes integer from pointer without a cast [-Wint-conversion]
pxNewTCB->uxTCBNumber = uxTaskNumber;
^
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'uxTaskGetSystemState':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2483:20: warning: comparison between pointer and integer
if( uxArraySize >= uxCurrentNumberOfTasks )
^~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2490:80: warning: passing argument 2 of 'prvListTasksWithinSingleList' from incompatible pointer type [-Wincompatible-pointer-types]
uxTask += prvListTasksWithinSingleList( &( pxTaskStatusArray[ uxTask ] ), &( pxReadyTasksLists[ uxQueue ] ), eReady );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:505:92: note: expected 'List_t *' {aka 'struct xLIST *'} but argument is of type 'List_t (*)[5]' {aka 'struct xLIST (*)[5]'}
static UBaseType_t prvListTasksWithinSingleList( TaskStatus_t *pxTaskStatusArray, List_t *pxList, eTaskState eState ) PRIVILEGED_FUNCTION;
~~~~~~~~^~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2503:80: warning: passing argument 2 of 'prvListTasksWithinSingleList' from incompatible pointer type [-Wincompatible-pointer-types]
uxTask += prvListTasksWithinSingleList( &( pxTaskStatusArray[ uxTask ] ), &xTasksWaitingTermination, eDeleted );
^~~~~~~~~~~~~~~~~~~~~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:505:92: note: expected 'List_t *' {aka 'struct xLIST *'} but argument is of type 'List_t (*)[2]' {aka 'struct xLIST (*)[2]'}
static UBaseType_t prvListTasksWithinSingleList( TaskStatus_t *pxTaskStatusArray, List_t *pxList, eTaskState eState ) PRIVILEGED_FUNCTION;
~~~~~~~~^~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2511:80: warning: passing argument 2 of 'prvListTasksWithinSingleList' from incompatible pointer type [-Wincompatible-pointer-types]
uxTask += prvListTasksWithinSingleList( &( pxTaskStatusArray[ uxTask ] ), &xSuspendedTaskList, eSuspended );
^~~~~~~~~~~~~~~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:505:92: note: expected 'List_t *' {aka 'struct xLIST *'} but argument is of type 'List_t (*)[2]' {aka 'struct xLIST (*)[2]'}
static UBaseType_t prvListTasksWithinSingleList( TaskStatus_t *pxTaskStatusArray, List_t *pxList, eTaskState eState ) PRIVILEGED_FUNCTION;
~~~~~~~~^~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'vTaskGetInfo':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:3626:14: warning: comparison of distinct pointer types lacks a cast
if( pxTCB == pxCurrentTCB )
^~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'vTaskList':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:4292:15: warning: assignment to 'UBaseType_t' {aka 'volatile long unsigned int'} from 'volatile UBaseType_t *' {aka 'volatile long unsigned int *'} makes integer from pointer without a cast [-Wint-conversion]
uxArraySize = uxCurrentNumberOfTasks;
^
Sketch uses 95791 bytes (1%) of program storage space. Maximum is 8388608 bytes.
  • A lot of warnings but successfully built.

2.2.1.2 Upload Using Programmer (k-flash)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
 Sketch uses 95791 bytes (1%) of program storage space. Maximum is 8388608 bytes.
[INFO] ANSI colors not used
[INFO] COM Port Selected Manually: /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
*
[INFO] Greeting Message Detected, Start Downloading ISP

Downloading ISP: |---------------------------------------------| 1.5%

Downloading ISP: |=--------------------------------------------| 3.1%

Downloading ISP: |==-------------------------------------------| 4.6%

Downloading ISP: |==-------------------------------------------| 6.2%

Downloading ISP: |===------------------------------------------| 7.7%

Downloading ISP: |====-----------------------------------------| 9.2%

Downloading ISP: |====-----------------------------------------| 10.8%

Downloading ISP: |=====----------------------------------------| 12.3%

Downloading ISP: |======---------------------------------------| 13.8%

Downloading ISP: |======---------------------------------------| 15.4%

Downloading ISP: |=======--------------------------------------| 16.9% 10kiB/s

Downloading ISP: |========-------------------------------------| 18.5% 10kiB/s

Downloading ISP: |=========------------------------------------| 20.0% 10kiB/s

Downloading ISP: |=========------------------------------------| 21.5% 10kiB/s

Downloading ISP: |==========-----------------------------------| 23.1% 10kiB/s

Downloading ISP: |===========----------------------------------| 24.6% 10kiB/s

Downloading ISP: |===========----------------------------------| 26.2% 10kiB/s

Downloading ISP: |============---------------------------------| 27.7% 10kiB/s

Downloading ISP: |=============--------------------------------| 29.2% 10kiB/s

Downloading ISP: |=============--------------------------------| 30.8% 10kiB/s

Downloading ISP: |==============-------------------------------| 32.3% 10kiB/s

Downloading ISP: |===============------------------------------| 33.8% 10kiB/s

Downloading ISP: |===============------------------------------| 35.4% 10kiB/s

Downloading ISP: |================-----------------------------| 36.9% 10kiB/s

Downloading ISP: |=================----------------------------| 38.5% 10kiB/s

Downloading ISP: |==================---------------------------| 40.0% 10kiB/s

Downloading ISP: |==================---------------------------| 41.5% 10kiB/s

Downloading ISP: |===================--------------------------| 43.1% 10kiB/s

Downloading ISP: |====================-------------------------| 44.6% 10kiB/s

Downloading ISP: |====================-------------------------| 46.2% 10kiB/s

Downloading ISP: |=====================------------------------| 47.7% 10kiB/s

Downloading ISP: |======================-----------------------| 49.2% 10kiB/s

Downloading ISP: |======================-----------------------| 50.8% 10kiB/s

Downloading ISP: |=======================----------------------| 52.3% 10kiB/s

Downloading ISP: |========================---------------------| 53.8% 10kiB/s

Downloading ISP: |========================---------------------| 55.4% 10kiB/s

Downloading ISP: |=========================--------------------| 56.9% 10kiB/s

Downloading ISP: |==========================-------------------| 58.5% 10kiB/s

Downloading ISP: |===========================------------------| 60.0% 10kiB/s

Downloading ISP: |===========================------------------| 61.5% 10kiB/s

Downloading ISP: |============================-----------------| 63.1% 10kiB/s

Downloading ISP: |=============================----------------| 64.6% 10kiB/s

Downloading ISP: |=============================----------------| 66.2% 10kiB/s

Downloading ISP: |==============================---------------| 67.7% 10kiB/s

Downloading ISP: |===============================--------------| 69.2% 10kiB/s

Downloading ISP: |===============================--------------| 70.8% 10kiB/s

Downloading ISP: |================================-------------| 72.3% 10kiB/s

Downloading ISP: |=================================------------| 73.8% 10kiB/s

Downloading ISP: |=================================------------| 75.4% 10kiB/s

Downloading ISP: |==================================-----------| 76.9% 10kiB/s

Downloading ISP: |===================================----------| 78.5% 10kiB/s

Downloading ISP: |====================================---------| 80.0% 10kiB/s

Downloading ISP: |====================================---------| 81.5% 10kiB/s

Downloading ISP: |=====================================--------| 83.1% 10kiB/s

Downloading ISP: |======================================-------| 84.6% 10kiB/s

Downloading ISP: |======================================-------| 86.2% 10kiB/s

Downloading ISP: |=======================================------| 87.7% 10kiB/s

Downloading ISP: |========================================-----| 89.2% 10kiB/s

Downloading ISP: |========================================-----| 90.8% 10kiB/s

Downloading ISP: |=========================================----| 92.3% 10kiB/s

Downloading ISP: |==========================================---| 93.8% 10kiB/s

Downloading ISP: |==========================================---| 95.4% 10kiB/s

Downloading ISP: |===========================================--| 96.9% 10kiB/s

Downloading ISP: |============================================-| 98.5% 10kiB/s

Downloading ISP: |=============================================| 100.0% 10kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate: 500000
[INFO] Baudrate changed, greeting with ISP again ...
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash: On-Board
[INFO] Initialization flash Successfully

Programming BIN: |======================-----------------------| 50.0% 28kiB/s

Programming BIN: |=============================================| 100.0% 28kiB/s
[INFO] Rebooting...

2.2.1.3 Demonstration

Too simple. Ignore...

2.2.2 Basic Graphics

2.2.2.1 Verify/Compile

  • Compilation error:
1
2
3
4
5
6
7
8
9
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp: In member function 'void Adafruit_I2CDevice::end()':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp:52:10: error: 'class TwoWire' has no member named 'end'; did you mean 'read'?
_wire->end();
^~~
read

exit status 1

Compilation error: exit status 1
  • Solution: comment out this line: _wire->end();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/wiring_analog.c: In function 'analogRead':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/wiring_analog.c:104:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'vAddNewTaskToCurrentReadyList':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:1111:26: warning: assignment to 'UBaseType_t' {aka 'long unsigned int'} from 'UBaseType_t *' {aka 'long unsigned int *'} makes integer from pointer without a cast [-Wint-conversion]
pxNewTCB->uxTCBNumber = uxTaskNumber;
^
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'uxTaskGetSystemState':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2483:20: warning: comparison between pointer and integer
if( uxArraySize >= uxCurrentNumberOfTasks )
^~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2490:80: warning: passing argument 2 of 'prvListTasksWithinSingleList' from incompatible pointer type [-Wincompatible-pointer-types]
uxTask += prvListTasksWithinSingleList( &( pxTaskStatusArray[ uxTask ] ), &( pxReadyTasksLists[ uxQueue ] ), eReady );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:505:92: note: expected 'List_t *' {aka 'struct xLIST *'} but argument is of type 'List_t (*)[5]' {aka 'struct xLIST (*)[5]'}
static UBaseType_t prvListTasksWithinSingleList( TaskStatus_t *pxTaskStatusArray, List_t *pxList, eTaskState eState ) PRIVILEGED_FUNCTION;
~~~~~~~~^~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2503:80: warning: passing argument 2 of 'prvListTasksWithinSingleList' from incompatible pointer type [-Wincompatible-pointer-types]
uxTask += prvListTasksWithinSingleList( &( pxTaskStatusArray[ uxTask ] ), &xTasksWaitingTermination, eDeleted );
^~~~~~~~~~~~~~~~~~~~~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:505:92: note: expected 'List_t *' {aka 'struct xLIST *'} but argument is of type 'List_t (*)[2]' {aka 'struct xLIST (*)[2]'}
static UBaseType_t prvListTasksWithinSingleList( TaskStatus_t *pxTaskStatusArray, List_t *pxList, eTaskState eState ) PRIVILEGED_FUNCTION;
~~~~~~~~^~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:2511:80: warning: passing argument 2 of 'prvListTasksWithinSingleList' from incompatible pointer type [-Wincompatible-pointer-types]
uxTask += prvListTasksWithinSingleList( &( pxTaskStatusArray[ uxTask ] ), &xSuspendedTaskList, eSuspended );
^~~~~~~~~~~~~~~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:505:92: note: expected 'List_t *' {aka 'struct xLIST *'} but argument is of type 'List_t (*)[2]' {aka 'struct xLIST (*)[2]'}
static UBaseType_t prvListTasksWithinSingleList( TaskStatus_t *pxTaskStatusArray, List_t *pxList, eTaskState eState ) PRIVILEGED_FUNCTION;
~~~~~~~~^~~~~~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'vTaskGetInfo':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:3626:14: warning: comparison of distinct pointer types lacks a cast
if( pxTCB == pxCurrentTCB )
^~
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c: In function 'vTaskList':
~/.arduino15/packages/Maixduino/hardware/k210/0.3.11/cores/arduino/kendryte-standalone-sdk/lib/freertos/tasks.c:4292:15: warning: assignment to 'UBaseType_t' {aka 'volatile long unsigned int'} from 'volatile UBaseType_t *' {aka 'volatile long unsigned int *'} makes integer from pointer without a cast [-Wint-conversion]
uxArraySize = uxCurrentNumberOfTasks;
^
Sketch uses 161412 bytes (1%) of program storage space. Maximum is 8388608 bytes.

2.2.2.2 Upload Using Programmer (k-flash)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Sketch uses 161412 bytes (1%) of program storage space. Maximum is 8388608 bytes.
[INFO] ANSI colors not used
[INFO] COM Port Selected Manually: /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
*
[INFO] Greeting Message Detected, Start Downloading ISP

Downloading ISP: |---------------------------------------------| 1.5%

Downloading ISP: |=--------------------------------------------| 3.1%

Downloading ISP: |==-------------------------------------------| 4.6%

Downloading ISP: |==-------------------------------------------| 6.2%

Downloading ISP: |===------------------------------------------| 7.7%

Downloading ISP: |====-----------------------------------------| 9.2%

Downloading ISP: |====-----------------------------------------| 10.8%

Downloading ISP: |=====----------------------------------------| 12.3%

Downloading ISP: |======---------------------------------------| 13.8%

Downloading ISP: |======---------------------------------------| 15.4%

Downloading ISP: |=======--------------------------------------| 16.9% 10kiB/s

Downloading ISP: |========-------------------------------------| 18.5% 10kiB/s

Downloading ISP: |=========------------------------------------| 20.0% 10kiB/s

Downloading ISP: |=========------------------------------------| 21.5% 10kiB/s

Downloading ISP: |==========-----------------------------------| 23.1% 10kiB/s

Downloading ISP: |===========----------------------------------| 24.6% 10kiB/s

Downloading ISP: |===========----------------------------------| 26.2% 10kiB/s

Downloading ISP: |============---------------------------------| 27.7% 10kiB/s

Downloading ISP: |=============--------------------------------| 29.2% 10kiB/s

Downloading ISP: |=============--------------------------------| 30.8% 10kiB/s

Downloading ISP: |==============-------------------------------| 32.3% 10kiB/s

Downloading ISP: |===============------------------------------| 33.8% 10kiB/s

Downloading ISP: |===============------------------------------| 35.4% 10kiB/s

Downloading ISP: |================-----------------------------| 36.9% 10kiB/s

Downloading ISP: |=================----------------------------| 38.5% 10kiB/s

Downloading ISP: |==================---------------------------| 40.0% 10kiB/s

Downloading ISP: |==================---------------------------| 41.5% 10kiB/s

Downloading ISP: |===================--------------------------| 43.1% 10kiB/s

Downloading ISP: |====================-------------------------| 44.6% 10kiB/s

Downloading ISP: |====================-------------------------| 46.2% 10kiB/s

Downloading ISP: |=====================------------------------| 47.7% 10kiB/s

Downloading ISP: |======================-----------------------| 49.2% 10kiB/s

Downloading ISP: |======================-----------------------| 50.8% 10kiB/s

Downloading ISP: |=======================----------------------| 52.3% 10kiB/s

Downloading ISP: |========================---------------------| 53.8% 10kiB/s

Downloading ISP: |========================---------------------| 55.4% 10kiB/s

Downloading ISP: |=========================--------------------| 56.9% 10kiB/s

Downloading ISP: |==========================-------------------| 58.5% 10kiB/s

Downloading ISP: |===========================------------------| 60.0% 10kiB/s

Downloading ISP: |===========================------------------| 61.5% 10kiB/s

Downloading ISP: |============================-----------------| 63.1% 10kiB/s

Downloading ISP: |=============================----------------| 64.6% 10kiB/s

Downloading ISP: |=============================----------------| 66.2% 10kiB/s

Downloading ISP: |==============================---------------| 67.7% 10kiB/s

Downloading ISP: |===============================--------------| 69.2% 10kiB/s

Downloading ISP: |===============================--------------| 70.8% 10kiB/s

Downloading ISP: |================================-------------| 72.3% 10kiB/s

Downloading ISP: |=================================------------| 73.8% 10kiB/s

Downloading ISP: |=================================------------| 75.4% 10kiB/s

Downloading ISP: |==================================-----------| 76.9% 10kiB/s

Downloading ISP: |===================================----------| 78.5% 10kiB/s

Downloading ISP: |====================================---------| 80.0% 10kiB/s

Downloading ISP: |====================================---------| 81.5% 10kiB/s

Downloading ISP: |=====================================--------| 83.1% 10kiB/s

Downloading ISP: |======================================-------| 84.6% 10kiB/s

Downloading ISP: |======================================-------| 86.2% 10kiB/s

Downloading ISP: |=======================================------| 87.7% 10kiB/s

Downloading ISP: |========================================-----| 89.2% 10kiB/s

Downloading ISP: |========================================-----| 90.8% 10kiB/s

Downloading ISP: |=========================================----| 92.3% 10kiB/s

Downloading ISP: |==========================================---| 93.8% 10kiB/s

Downloading ISP: |==========================================---| 95.4% 10kiB/s

Downloading ISP: |===========================================--| 96.9% 10kiB/s

Downloading ISP: |============================================-| 98.5% 10kiB/s

Downloading ISP: |=============================================| 100.0% 10kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate: 500000
[INFO] Baudrate changed, greeting with ISP again ...
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash: On-Board
[INFO] Initialization flash Successfully

Programming BIN: |===============------------------------------| 33.3% 28kiB/s

Programming BIN: |==============================---------------| 66.7% 28kiB/s

Programming BIN: |=============================================| 100.0% 28kiB/s
[INFO] Rebooting...

2.2.2.3 Demonstration

2.2.3 Display Images from the Camera on the LCD

2.2.3.0 Setup

  • Either: Directly open up File->Examples->Sipeed_OV2640->selfie, and in my case, change all occurrences of Sipeed_OV2640 to Sipeed_GC0328.
  • Or: Use official sipeed_gc0328.ino

2.2.3.1 Verify/Compile

1
Sketch uses 322004 bytes (3%) of program storage space. Maximum is 8388608 bytes.

2.2.3.2 Upload Using Programmer (k-flash)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Sketch uses 322004 bytes (3%) of program storage space. Maximum is 8388608 bytes.
[INFO] ANSI colors not used
[INFO] COM Port Selected Manually: /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
*
[INFO] Greeting Message Detected, Start Downloading ISP

Downloading ISP: |---------------------------------------------| 1.5%

Downloading ISP: |=--------------------------------------------| 3.1%

Downloading ISP: |==-------------------------------------------| 4.6%

Downloading ISP: |==-------------------------------------------| 6.2%

Downloading ISP: |===------------------------------------------| 7.7%

Downloading ISP: |====-----------------------------------------| 9.2%

Downloading ISP: |====-----------------------------------------| 10.8%

Downloading ISP: |=====----------------------------------------| 12.3%

Downloading ISP: |======---------------------------------------| 13.8%

Downloading ISP: |======---------------------------------------| 15.4%

Downloading ISP: |=======--------------------------------------| 16.9% 10kiB/s

Downloading ISP: |========-------------------------------------| 18.5% 10kiB/s

Downloading ISP: |=========------------------------------------| 20.0% 10kiB/s

Downloading ISP: |=========------------------------------------| 21.5% 10kiB/s

Downloading ISP: |==========-----------------------------------| 23.1% 10kiB/s

Downloading ISP: |===========----------------------------------| 24.6% 10kiB/s

Downloading ISP: |===========----------------------------------| 26.2% 10kiB/s

Downloading ISP: |============---------------------------------| 27.7% 10kiB/s

Downloading ISP: |=============--------------------------------| 29.2% 10kiB/s

Downloading ISP: |=============--------------------------------| 30.8% 10kiB/s

Downloading ISP: |==============-------------------------------| 32.3% 10kiB/s

Downloading ISP: |===============------------------------------| 33.8% 10kiB/s

Downloading ISP: |===============------------------------------| 35.4% 10kiB/s

Downloading ISP: |================-----------------------------| 36.9% 10kiB/s

Downloading ISP: |=================----------------------------| 38.5% 10kiB/s

Downloading ISP: |==================---------------------------| 40.0% 10kiB/s

Downloading ISP: |==================---------------------------| 41.5% 10kiB/s

Downloading ISP: |===================--------------------------| 43.1% 10kiB/s

Downloading ISP: |====================-------------------------| 44.6% 10kiB/s

Downloading ISP: |====================-------------------------| 46.2% 10kiB/s

Downloading ISP: |=====================------------------------| 47.7% 10kiB/s

Downloading ISP: |======================-----------------------| 49.2% 10kiB/s

Downloading ISP: |======================-----------------------| 50.8% 10kiB/s

Downloading ISP: |=======================----------------------| 52.3% 10kiB/s

Downloading ISP: |========================---------------------| 53.8% 10kiB/s

Downloading ISP: |========================---------------------| 55.4% 10kiB/s

Downloading ISP: |=========================--------------------| 56.9% 10kiB/s

Downloading ISP: |==========================-------------------| 58.5% 10kiB/s

Downloading ISP: |===========================------------------| 60.0% 10kiB/s

Downloading ISP: |===========================------------------| 61.5% 10kiB/s

Downloading ISP: |============================-----------------| 63.1% 10kiB/s

Downloading ISP: |=============================----------------| 64.6% 10kiB/s

Downloading ISP: |=============================----------------| 66.2% 10kiB/s

Downloading ISP: |==============================---------------| 67.7% 10kiB/s

Downloading ISP: |===============================--------------| 69.2% 10kiB/s

Downloading ISP: |===============================--------------| 70.8% 10kiB/s

Downloading ISP: |================================-------------| 72.3% 10kiB/s

Downloading ISP: |=================================------------| 73.8% 10kiB/s

Downloading ISP: |=================================------------| 75.4% 10kiB/s

Downloading ISP: |==================================-----------| 76.9% 10kiB/s

Downloading ISP: |===================================----------| 78.5% 10kiB/s

Downloading ISP: |====================================---------| 80.0% 10kiB/s

Downloading ISP: |====================================---------| 81.5% 10kiB/s

Downloading ISP: |=====================================--------| 83.1% 10kiB/s

Downloading ISP: |======================================-------| 84.6% 10kiB/s

Downloading ISP: |======================================-------| 86.2% 10kiB/s

Downloading ISP: |=======================================------| 87.7% 10kiB/s

Downloading ISP: |========================================-----| 89.2% 10kiB/s

Downloading ISP: |========================================-----| 90.8% 10kiB/s

Downloading ISP: |=========================================----| 92.3% 10kiB/s

Downloading ISP: |==========================================---| 93.8% 10kiB/s

Downloading ISP: |==========================================---| 95.4% 10kiB/s

Downloading ISP: |===========================================--| 96.9% 10kiB/s

Downloading ISP: |============================================-| 98.5% 10kiB/s

Downloading ISP: |=============================================| 100.0% 10kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate: 500000
[INFO] Baudrate changed, greeting with ISP again ...
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash: On-Board
[INFO] Initialization flash Successfully

Programming BIN: |===============------------------------------| 33.3% 27kiB/s

Programming BIN: |==============================---------------| 66.7% 28kiB/s

Programming BIN: |=============================================| 100.0% 28kiB/s
[INFO] Rebooting...

2.2.3.3 Demonstration

QuickFeather is a development board adopting QuickLogic's EOS S3 SOC.

1. Introduction

1.1 lsusb

1
2
3
......
Bus 011 Device 016: ID 1d50:6140 OpenMoko, Inc.
......

1.2 Openmoko

So cool. For Openmoko, please refer to:

1.3 Spec

  • All details can be found at QuickLogic's EOS S3 page.
  • In fact, the content on the QuickFeather crowdsupply website is also comprehensive and includes all necessary information.

1.4 Github Source Code

2. Flash the Firmware

2.1 Preparation

Please strictly follow: - the videos on QuickLogic's official website QuickFeather Development Kit - the installation steps on TinyFPGA-Programmer-Application

2.1.1 Highlight 1 - qfprog

In my .bashrc and .zshrc, the following line is added.

1
alias qfprog="python3 /opt/TinyFPGA-Programmer-Application/tinyfpga-programmer-gui.py"

2.1.2 Highlight 2 - tinyfpgaa and tinyfpgab

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
➜  ~ pip show tinyfpgab
Name: tinyfpgab
Version: 1.1.0
Summary: Programmer for the TinyFPGA B2 boards (http://tinyfpga.com)
Home-page: https://github.com/tinyfpga/TinyFPGA-B-Series/tree/master/programmer
Author: Luke Valenty
Author-email: lvalenty@gmail.com
License:
Location: ~/.local/lib/python3.10/site-packages
Requires: pyserial
Required-by:
➜ ~ pip show tinyfpgaa
Name: tinyfpgaa
Version: 0.9.0
Summary: A small example package
Home-page: https://github.com/tinyfpga/TinyFPGA-A-Programmer
Author: William D. Jones
Author-email: thor0505@comcast.net
License:
Location: ~/.local/lib/python3.10/site-packages/tinyfpgaa-0.9.0-py3.10.egg
Requires:
Required-by:

2.2 Now Let's Flash

2.2.1 Flash Bootloader

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
➜  qorc-sdk git:(master) ✗ qfprog --port=/dev/ttyACM0 --bl ./qf_apps/quickfeather-initial-binaries/qf_bootloader.bin
CLI mode
ports = ['/dev/ttyACM0 (QuickFeather)'] 1
Using port /dev/ttyACM0 (QuickFeather)
Programming bootloader with ./qf_apps/quickfeather-initial-binaries/qf_bootloader.bin
Erasing designated flash pages
Erase 32.0 KiB ( 0x52 ) at 0x0
Erase 4.0 KiB ( 0x20 ) at 0x8000
Erase 4.0 KiB ( 0x20 ) at 0x9000
Writing binary
Write 40340 bytes
[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]
Verifying binary
FastREAD 0x0B ( 40340 )
[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]
Success: read_back == data
Writing metadata
Erasing designated flash pages
Erase 4.0 KiB ( 0x20 ) at 0x1f000
Writing metadata
Write 8 bytes
[X] ]
Verifying metadata
FastREAD 0x0B ( 8 )
[X] ]
Success: read_back == data

2.2.2 Flash BootFPGA

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
➜  qorc-sdk git:(master) ✗ qfprog --port=/dev/ttyACM0 --bootfpga ./qf_apps/quickfeather-initial-binaries/qf_bootfpga.bin
CLI mode
ports = ['/dev/ttyACM0 (QuickFeather)'] 1
Using port /dev/ttyACM0 (QuickFeather)
Programming FPGA image used during programming ./qf_apps/quickfeather-initial-binaries/qf_bootfpga.bin
Erasing designated flash pages
Erase 64.0 KiB ( 0xd8 ) at 0x20000
Erase 4.0 KiB ( 0x20 ) at 0x30000
Erase 4.0 KiB ( 0x20 ) at 0x31000
Erase 4.0 KiB ( 0x20 ) at 0x32000
Writing binary
Write 75960 bytes
[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]
Verifying binary
FastREAD 0x0B ( 75960 )
[XXXXXXXXXXXXXXXXXXXXXXXXXXXXTraceback (most recent call last):
File "/opt/TinyFPGA-Programmer-Application/tinyfpga-programmer-gui.py", line 206, in program
fpga.program_bitstream(addr, bitstream, "binary")
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 311, in program_bitstream
if self.program(addr, bitstream, what):
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 237, in program
read_back = self.read(addr, len(data))
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 72, in read
data += self.cmd(0x0b, addr, b'\x00', read_len=read_length)
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 45, in cmd
response = self.ser.read(read_len)
File "~/.local/lib/python3.10/site-packages/serial/serialposix.py", line 595, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Writing metadata
Erasing designated flash pages
Traceback (most recent call last):
File "~/.local/lib/python3.10/site-packages/serial/serialposix.py", line 621, in write
n = os.write(self.fd, d)
OSError: [Errno 5] Input/output error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/TinyFPGA-Programmer-Application/tinyfpga-programmer-gui.py", line 218, in program
fpga.program_bitstream(meta_addr, meta_bitstream, "metadata")
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 311, in program_bitstream
if self.program(addr, bitstream, what):
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 229, in program
self.quick_erase(addr, len(data))
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 179, in quick_erase
self._erase(start_addr, 0x1000)
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 108, in _erase
self.write_enable()
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 86, in write_enable
self.cmd(0x06)
File "/opt/TinyFPGA-Programmer-Application/q-series/python/tinyfpgaq.py", line 43, in cmd
self.ser.write(bytearray(cmd_write_string))
File "~/.local/lib/python3.10/site-packages/serial/serialposix.py", line 655, in write
raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error

2.2.3 Bricked

Unfortunately, my QuickFeather is bricked. Whenever reset or even entering user mode, the LED on QuickFeather turns to red in the end.

Raspberry Pi Pico is a MCU, which adopts Raspberry Pi's chip RP2040.

1. Introduction

1.1 lsusb

1
2
3
......
Bus 011 Device 021: ID 2e8a:000a Raspberry Pi Pico
......

1.2 Spec

1.3 Github Source Code

2. Flash the Firmware

2.1 Micropython

2.1.1 How to?

The official way to flash a Raspberry Pi Pico is just to drag-and-drop the Micropython UF2 file onto it. Please follow:

2.1.2 Demonstration

By connecting from my Ubuntu desktop using command

1
➜  ~ minicom -b 115200 -o -D /dev/ttyACM0

we can easily connect to Raspberry Pi Pico:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Welcome to minicom 2.8

OPTIONS: I18n
Port /dev/ttyACM0, 02:38:32

Press CTRL-A Z for help on special keys


>>> import os
>>> os.uname()
(sysname='rp2', nodename='rp2', release='1.21.0', version='v1.21.0 on 2023-10-06 (GNU 13.2.0 MinSizeRel)', machine='Raspberry Pi Pico with RP2040')
>>> import sys
>>> sys.implementation
(name='micropython', version=(1, 21, 0), _machine='Raspberry Pi Pico with RP2040', _mpy=4358)
>>>

2.2 Arduino

2.2.1 Using Arduino IDE

Since Raspberry Pi Pico is an MCU, it is of course able to be connected using the popular Arduino IDE.

I actually strictly follow this blog Programming Raspberry Pi Pico with Arduino IDE.

2.2.2 Flash with BOOTSEL Pressed

In my test, no matter MicroPython Download RPI_PICO is dragged-and-dropped, or a customized program is uploaded via Arduino IDE as in the following picture:

Arduino IDE Raspberry Pi Pico

I ALWAYS hold the BOOTSEL button.

3. More to Talk

3.1 LED Example Demo

3.2 Please Try Out Raspberry Pi Pico W and Pico WH Yourself

Recommended tutorials: - Getting started with your Raspberry Pi Pico W

1. Specifications

Details about VisionFive2 can be found on StarFive's official website VisionFive2 Specs.

2. Debian Installation

2.1 Getting Started

2.2 Overview

2.2.1 SSH into VisionFive2 Debian

SSH Into VisionFive2

2.2.2 CPU Info

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
user@starfive:~$ cat /proc/cpuinfo
processor : 0
hart : 1
isa : rv64imafdc
mmu : sv39
isa-ext :
uarch : sifive,u74-mc

processor : 1
hart : 2
isa : rv64imafdc
mmu : sv39
isa-ext :
uarch : sifive,u74-mc

processor : 2
hart : 3
isa : rv64imafdc
mmu : sv39
isa-ext :
uarch : sifive,u74-mc

processor : 3
hart : 4
isa : rv64imafdc
mmu : sv39
isa-ext :
uarch : sifive,u74-mc

2.2.3 Memory Info

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
user@starfive:~$ cat /proc/meminfo
MemTotal: 3967740 kB
MemFree: 3086144 kB
MemAvailable: 3408808 kB
Buffers: 15396 kB
Cached: 319444 kB
SwapCached: 0 kB
Active: 170156 kB
Inactive: 467480 kB
Active(anon): 3264 kB
Inactive(anon): 303136 kB
Active(file): 166892 kB
Inactive(file): 164344 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 302844 kB
Mapped: 178224 kB
Shmem: 3604 kB
KReclaimable: 34932 kB
Slab: 71832 kB
SReclaimable: 34932 kB
SUnreclaim: 36900 kB
KernelStack: 6112 kB
PageTables: 8188 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1983868 kB
Committed_AS: 2616964 kB
VmallocTotal: 67108863 kB
VmallocUsed: 19120 kB
VmallocChunk: 0 kB
Percpu: 528 kB
CmaTotal: 524288 kB
CmaFree: 489424 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
user@starfive:~$

2.2.4 List Block Devices

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
user@starfive:~$ lsblk       
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 256K 0 disk
mtdblock1 31:1 0 64K 0 disk
mtdblock2 31:2 0 3M 0 disk
mtdblock3 31:3 0 1M 0 disk
mmcblk1 179:0 0 119.1G 0 disk
|-mmcblk1p1 179:1 0 2M 0 part
|-mmcblk1p2 179:2 0 4M 0 part
|-mmcblk1p3 179:3 0 100M 0 part
`-mmcblk1p4 179:4 0 3.8G 0 part /
nvme0n1 259:0 0 238.5G 0 disk
|-nvme0n1p1 259:1 0 128M 0 part
|-nvme0n1p2 259:2 0 572M 0 part
`-nvme0n1p3 259:3 0 237.8G 0 part

2.3 Resize

VisionFive2 fdisk
VisionFive2 resize2fs

3. User Guide

So far, we successfully boot into VisionFive2 Debian 202310 Released using the SD card. But how to boot with eMMC or NVME.

I got the solution from my posted issue Boot from eMMC or NVME? Existing Doubts on the official RVspace forum. The solution is just hidden in the file /boot/extlinux/extlinux.conf. Well, to modify this file correspondingly, you need to:

  • mount /boot using sudo mount /dev/sdc3 /mnt
  • take a look at the file /boot/extlinux/extlinux.conf
  • modify this file accordingly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
➜  extlinux cat extlinux.conf 
## /extlinux/extlinux.conf
##
## IMPORTANT WARNING
##
## The configuration of this file is generated automatically.
## Do not edit this file manually, use: u-boot-update

default l1
menu title U-Boot menu
prompt 0
timeout 50


label l0
menu label Debian GNU/Linux bookworm/sid 5.15.0-starfive
linux /vmlinuz-5.15.0-starfive
initrd /initrd.img-5.15.0-starfive


fdtdir /dtbs
append root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0

label l0r
menu label Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target)
linux /vmlinuz-5.15.0-starfive
initrd /initrd.img-5.15.0-starfive

fdtdir /dtbs
append root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 single

label l1
menu label Debian GNU/Linux bookworm/sid 5.15.0-starfive
linux /vmlinuz-5.15.0-starfive
initrd /initrd.img-5.15.0-starfive


fdtdir /dtbs
append root=/dev/nvme0n1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0

label l1r
menu label Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target)
linux /vmlinuz-5.15.0-starfive
initrd /initrd.img-5.15.0-starfive

fdtdir /dtbs
append root=/dev/nvme0n1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 single

Now, I'm able to boot from both SD card or NVME, however, there seems to be NO such a thing similar to grub? And I'll have to manually edit the value of default l1 accordingly whenever I want to boot from a different device.

Anyway, I've got to stop here for now. I'll talk about how to build a fresh distro for VisionFive2 from scratch in my next post.

Continue, the Arduino UNO R4.

1. Introduction

1.1 lsusb

1
2
3
......
Bus 011 Device 058: ID 2341:1002 Arduino SA UNO WiFi R4 CMSIS-DAP
......

1.2 Spec

What I purchased is an Arduino UNO R4 WiFi. Detailed specification about it can be found on Arduino UNO R4 Wifi Doc.

1.3 Github Source Code

Typically, there's no need to rebuild your project from the ground up. However, when needed, Arduino UNO R4 Wifi USB Bridge offers open-source resource that you can utilize as a foundation for further development.

2. Demonstrate Arduino Examples

2.1 Environment Configuration

  • Install Arduino Environment When I tried to run the basic example blink, I was asked to install the package renesas_uno@1.0.5, as shown in the Output console of Arduino IDE: Arduino UNO R4 Wifi Output

2.2 Flash a Sketch

  • Sketch Verify/Compile
1
2
Sketch uses 51488 bytes (19%) of program storage space. Maximum is 262144 bytes.
Global variables use 6744 bytes (20%) of dynamic memory, leaving 26024 bytes for local variables. Maximum is 32768 bytes.
  • Upload
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sketch uses 51488 bytes (19%) of program storage space. Maximum is 262144 bytes.
Global variables use 6744 bytes (20%) of dynamic memory, leaving 26024 bytes for local variables. Maximum is 32768 bytes.
Erase flash

Done in 0.001 seconds
Write 51496 bytes to flash (13 pages)

[ ] 0% (0/13 pages)
[== ] 7% (1/13 pages)
[==== ] 15% (2/13 pages)
[====== ] 23% (3/13 pages)
[========= ] 30% (4/13 pages)
[=========== ] 38% (5/13 pages)
[============= ] 46% (6/13 pages)
[================ ] 53% (7/13 pages)
[================== ] 61% (8/13 pages)
[==================== ] 69% (9/13 pages)
[======================= ] 76% (10/13 pages)
[========================= ] 84% (11/13 pages)
[=========================== ] 92% (12/13 pages)
[==============================] 100% (13/13 pages)
Done in 3.480 seconds

Now, one LED starts blinking successfully.

3. Arduino UNO R4 WiFi Examples

3.1 Wi-Fi Web Server

First, let me test the example Wi-Fi® Web Server on Arduino official tutorial UNO R4 WiFi Network Examples. The code can be found on Github Arduino WiFiWebServer. And the following is printed in the Output console of Arduino IDE.

1
2
3
4
5
Please upgrade the firmware
Attempting to connect to SSID: TELUSXXXX
SSID: TELUSXXXX
IP Address: 192.168.1.YY
signal strength (RSSI):-52 dBm

3.2 Upgrade Firmware of UNO R4 Wifi

It's confusing that I received the error message Please upgrade the firmware, right after I installed/upgraded renesas_uno@1.0.5 from within Arduino IDE.

In the end, I noticed there are 2 main chips on Arduino UNO R4 WiFi, and renesas's firmware is installed/upgraded, but ESP32's firmware hasn't yet. Therefore, I proceeded with upgrading ESP32's firmware by following Arduino UNO R4 WiFi Upload to ESP32.

Different from 1.1, by shorting the download pin and GND, now we have a different lsusb result:

1
2
3
......
Bus 011 Device 007: ID 303a:1001 Espressif USB JTAG/serial debug unit
......

Again, I was asked to install the esp32 package(s), as shown:

esp32 installation

Click YES and continue the installation:

esp32 packages to upgrade
install esp32 package
install esp32 boards package

3.3 Wi-Fi Web Client

Now, let me test the example Wi-Fi® Web Client on Arduino official tutorial UNO R4 WiFi Network Examples. The code can be found on Github Arduino WiFiWebClient. And a bunch of communication info with www.google.com are printed on the Output console of Arduino IDE.

Arduino Wifi Web Client Upload
Arduino Wifi Web Client Running

4. Arduino UNO R4 WiFi - ChatGPT

Finally, let's extend a bit. Let's finish our demonstration of the day by chatting with OpenAI's ChatGPT on this Arduino UNO R4 WiFi.

My source code is provided at Longer Vision Robot Arduino Examples.

And its demonstration can be seen by this screenshot.

Arduino UNO R4 WiFi ChatGPT

Quickly had LLVM 17.0.3 built from source again. Just follow the official website:

1. Git clone

1
git clone https://github.com/llvm/llvm-project.git

2. CMake Configure

There is a very serious pitfall here, please refer to LLVM CMake documentation

For LLVM-related variable LLVM_ENABLE_PROJECTS, if you want to build ALL projects by specifying -DLLVM_ENABLE_PROJECTS=all, all the following projects clang;clang-tools-extra;cross-project-tests;libc;libclc;lld;lldb;openmp;polly;pstl are to be built. Particularly, libc is also to be built, which will bring me the following error:

1
2
....../llvm-project/libc/src/string/strcpy.cpp:17:28: error: ‘char*__llvm_libc_18_0_0_git::strcpy(char*, const char*)’ aliased to external symbol ‘strcpy’
17 | LLVM_LIBC_FUNCTION(char*, strcpy,

Therefore, it's better to avoid building libc.

1
2
3
4
5
6
cmake -S llvm-project/llvm -B llvm-project/build \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;lld;lldb" \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DBUILD_SHARED_LIBS=Onhexo

3. Build

1
cmake --build llvm-project/build -j16

4. Installation

1
sudo cmake --install llvm-project/build --prefix /usr/local 

0. Preparation

1. Getting Started with Images

2. Basic Image Manipulation

3. Image Annotation

4. Image Enhancement

5. Accessing Camera

6. Video Writing

7. Image Filtering Edge Detection

8. Image Features and Alignment

9. Panorama

10. HDR

11. Object Tracking

12. Face Detection

13. Object Detection

14. Openpose