File tree 3 files changed +26
-7
lines changed
3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ sunxi_serial_t uart_dbg = {
32
32
.stop = UART_STOP_BIT_0 ,
33
33
.parity = UART_PARITY_NO ,
34
34
.gpio_pin = {
35
- .gpio_tx = {GPIO_PIN (GPIO_PORTF , 2 ), GPIO_PERIPH_MUX3 },
36
- .gpio_rx = {GPIO_PIN (GPIO_PORTF , 4 ), GPIO_PERIPH_MUX3 },
35
+ .gpio_tx = {GPIO_PIN (GPIO_PORTB , 9 ), GPIO_PERIPH_MUX2 },
36
+ .gpio_rx = {GPIO_PIN (GPIO_PORTB , 10 ), GPIO_PERIPH_MUX2 },
37
37
},
38
38
.uart_clk = {
39
39
.gate_reg_base = SUNXI_CCU_BASE + UART0_BGR_REG ,
@@ -83,7 +83,7 @@ void show_chip() {
83
83
84
84
switch (chip_markid_sid ) {
85
85
case 0x5f00 :
86
- printk_info ("Chip type = A733MX-N3X " );
86
+ printk_info ("Chip type = T536MX-CXX " );
87
87
break ;
88
88
default :
89
89
printk_info ("Chip type = UNKNOW" );
Original file line number Diff line number Diff line change 15
15
#include <sys-sdcard.h>
16
16
#include <sys-i2c.h>
17
17
18
+ #include <cli.h>
19
+ #include <cli_shell.h>
20
+ #include <cli_termesc.h>
21
+
18
22
extern sunxi_serial_t uart_dbg ;
19
23
24
+ msh_declare_command (helloworld );
25
+
26
+ msh_define_help (helloworld , "display helloworld" , "Usage: helloworld\n" );
27
+ int cmd_helloworld (int argc , const char * * argv ) {
28
+ printk (LOG_LEVEL_MUTE , "Hello World!\n" );
29
+ return 0 ;
30
+ }
31
+
32
+ const msh_command_entry commands [] = {
33
+ msh_define_command (helloworld ),
34
+ msh_command_end ,
35
+ };
36
+
20
37
int main (void ) {
21
38
sunxi_serial_init (& uart_dbg );
22
39
@@ -28,6 +45,8 @@ int main(void) {
28
45
29
46
printk_info ("Hello World!\n" );
30
47
48
+ syterkit_shell_attach (commands );
49
+
31
50
abort ();
32
51
33
52
return 0 ;
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ set(CMAKE_COMMON_FLAGS "-nostdlib -nostdinc -Os -march=armv8.2-a -mthumb-interwo
28
28
set (CMAKE_C_DISABLE_WARN_FLAGS "-Wno-int-to-pointer-cast -Wno-implicit-function-declaration -Wno-discarded-qualifiers" )
29
29
set (CMAKE_CXX_DISABLE_WARN_FLAGS "-Wno-int-to-pointer-cast" )
30
30
31
- set (ARCH_BIN_START_ADDRESS "0x00044000 " )
32
- set (ARCH_BIN_SRAM_LENGTH "96K " )
31
+ set (ARCH_BIN_START_ADDRESS "0x44000 " )
32
+ set (ARCH_BIN_SRAM_LENGTH "128K " )
33
33
34
- set (ARCH_FEL_START_ADDRESS "0x00020000 " )
35
- set (ARCH_FEL_SRAM_LENGTH "128K " )
34
+ set (ARCH_FEL_START_ADDRESS "0x4c000 " )
35
+ set (ARCH_FEL_SRAM_LENGTH "96K " )
You can’t perform that action at this time.
0 commit comments