Skip to content

Commit 47b3f26

Browse files
SamulKyullSamulKyull
SamulKyull
authored and
SamulKyull
committed
[board] bringup t536 uart
1 parent 8b14642 commit 47b3f26

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

board/tlt536-evm/board.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ sunxi_serial_t uart_dbg = {
3232
.stop = UART_STOP_BIT_0,
3333
.parity = UART_PARITY_NO,
3434
.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},
3737
},
3838
.uart_clk = {
3939
.gate_reg_base = SUNXI_CCU_BASE + UART0_BGR_REG,
@@ -83,7 +83,7 @@ void show_chip() {
8383

8484
switch (chip_markid_sid) {
8585
case 0x5f00:
86-
printk_info("Chip type = A733MX-N3X");
86+
printk_info("Chip type = T536MX-CXX");
8787
break;
8888
default:
8989
printk_info("Chip type = UNKNOW");

board/tlt536-evm/hello_world/main.c

+19
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,25 @@
1515
#include <sys-sdcard.h>
1616
#include <sys-i2c.h>
1717

18+
#include <cli.h>
19+
#include <cli_shell.h>
20+
#include <cli_termesc.h>
21+
1822
extern sunxi_serial_t uart_dbg;
1923

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+
2037
int main(void) {
2138
sunxi_serial_init(&uart_dbg);
2239

@@ -28,6 +45,8 @@ int main(void) {
2845

2946
printk_info("Hello World!\n");
3047

48+
syterkit_shell_attach(commands);
49+
3150
abort();
3251

3352
return 0;

cmake/board/tlt536-evm.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ set(CMAKE_COMMON_FLAGS "-nostdlib -nostdinc -Os -march=armv8.2-a -mthumb-interwo
2828
set(CMAKE_C_DISABLE_WARN_FLAGS "-Wno-int-to-pointer-cast -Wno-implicit-function-declaration -Wno-discarded-qualifiers")
2929
set(CMAKE_CXX_DISABLE_WARN_FLAGS "-Wno-int-to-pointer-cast")
3030

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")
3333

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")

0 commit comments

Comments
 (0)