Skip to content

Commit faaa35f

Browse files
SamulKyullSamulKyull
SamulKyull
authored and
SamulKyull
committed
[board] add avaota f1
1 parent 8444301 commit faaa35f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+420
-17
lines changed

board/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ if(CONFIG_BOARD_AVAOTA-A1)
5050
add_subdirectory(avaota-a1)
5151
endif()
5252

53-
if(CONFIG_BOARD_AVAOTA-CAM)
54-
add_subdirectory(avaota-cam)
53+
if(CONFIG_BOARD_AVAOTA-F1)
54+
add_subdirectory(avaota-f1)
5555
endif()
5656

5757
if(CONFIG_BOARD_AVAOTA-NAS)

board/avaota-cam/CMakeLists.txt board/avaota-f1/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set(APP_COMMON_SOURCE
55
${CMAKE_CURRENT_SOURCE_DIR}/head.c
66
)
77

8-
add_subdirectory(hello_world)
8+
add_subdirectory(app)

board/avaota-cam/README.md board/avaota-f1/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0+
22

3-
add_syterkit_app(helloworld
3+
add_syterkit_app(app
44
main.c
55
)

board/avaota-cam/hello_world/main.c board/avaota-f1/app/main.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
#include <cli_shell.h>
2626
#include <cli_termesc.h>
2727

28-
extern sunxi_serial_t uart_dbg;
28+
extern sunxi_serial_t uart_mcu_dbg;
29+
extern sunxi_serial_t uart_cpu_dbg;
2930
extern sunxi_serial_t uart_card;
3031
extern dram_para_t dram_para;
3132
extern sunxi_dma_t sunxi_dma;
@@ -123,7 +124,9 @@ const msh_command_entry commands[] = {
123124
int main(void) {
124125
sunxi_clk_pre_init();
125126

126-
sunxi_serial_init(&uart_dbg);
127+
sunxi_serial_init(&uart_cpu_dbg);
128+
129+
sunxi_serial_init(&uart_mcu_dbg);
127130

128131
sunxi_serial_init(&uart_card);
129132

board/avaota-cam/board.c board/avaota-f1/board.c

+21-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,27 @@
2323
#include <sys-spi.h>
2424
#include <sys-uart.h>
2525

26-
sunxi_serial_t uart_dbg = {
26+
sunxi_serial_t uart_mcu_dbg = {
27+
.base = SUNXI_UART0_BASE,
28+
.id = 0,
29+
.baud_rate = UART_BAUDRATE_115200,
30+
.dlen = UART_DLEN_8,
31+
.stop = UART_STOP_BIT_0,
32+
.parity = UART_PARITY_NO,
33+
.gpio_pin = {
34+
.gpio_tx = {GPIO_PIN(GPIO_PORTD, 22), GPIO_PERIPH_MUX3},
35+
.gpio_rx = {GPIO_PIN(GPIO_PORTD, 23), GPIO_PERIPH_MUX3},
36+
},
37+
.uart_clk = {
38+
.gate_reg_base = SUNXI_CCU_APP_BASE + BUS_CLK_GATING0_REG,
39+
.gate_reg_offset = BUS_CLK_GATING0_REG_UART0_PCLK_EN_OFFSET,
40+
.rst_reg_base = SUNXI_CCU_APP_BASE + BUS_Reset0_REG,
41+
.rst_reg_offset = BUS_Reset0_REG_PRESETN_UART0_SW_OFFSET,
42+
.parent_clk = 192000000,
43+
},
44+
};
45+
46+
sunxi_serial_t uart_cpu_dbg = {
2747
.base = SUNXI_UART0_BASE,
2848
.id = 0,
2949
.baud_rate = UART_BAUDRATE_115200,

board/avaota-cam/cdk/.gitignore board/avaota-f1/cdk/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Lst/
1515
Obj/
1616
cdkws.mk
17-
avaota_cam.modify.bat
18-
avaota_cam.mk
17+
avaota_f1.modify.bat
18+
avaota_f1.mk
1919
.cache
2020
.cdk

board/avaota-f1/cdk/avaota_cam.mk

+377
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
SET PATH=%Systemroot%\System32;%PATH%
3+
forfiles.exe -P "%1" -M %2 -C "cmd /c echo %1/%2 is modified at: @fdate @ftime" | findstr modified

board/avaota-cam/cdk/avaota_cam.cdkproj board/avaota-f1/cdk/avaota_f1.cdkproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<Project Name="avaota_cam" Version="1" Language="C" Type="Solution Package">
2+
<Project Name="avaota_f1" Version="1" Language="C" Type="Solution Package">
33
<Description/>
44
<Dependencies Name="Debug"/>
55
<MergedToYaml>yes</MergedToYaml>
66
<Dependencies Name="BuildSet"/>
77
<VendorInfo>
8-
<VendorName>new_soc_project_c_solution_e907f</VendorName>
8+
<VendorName>Avaota SBC Avaota F1</VendorName>
99
</VendorInfo>
1010
<ToolsConfig>
1111
<Compiler>
@@ -524,7 +524,7 @@
524524
</VirtualDirectory>
525525
</VirtualDirectory>
526526
<VirtualDirectory Name="app">
527-
<File Name="../hello_world/main.c">
527+
<File Name="../app/main.c">
528528
<FileOption/>
529529
</File>
530530
</VirtualDirectory>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<CDK_Workspace Name="Avaota CAM" Database="LanguageSever" DoubleClick="Yes">
2+
<CDK_Workspace Name="Avaota F1" Database="LanguageSever" DoubleClick="Yes">
33
<DefaultPackPath>$(CDKWS)\__workspace_pack__</DefaultPackPath>
4-
<Project Name="avaota_cam" Path="avaota_cam.cdkproj" RootPath="" Active="Yes"/>
4+
<Project Name="avaota_f1" Path="avaota_f1.cdkproj" RootPath="" Active="Yes"/>
55
<BuildMatrix>
66
<WorkspaceConfiguration Name="Debug" Selected="yes">
77
<Environment/>
8-
<Project Name="avaota_cam" ConfigName="BuildSet"/>
8+
<Project Name="avaota_f1" ConfigName="BuildSet"/>
99
</WorkspaceConfiguration>
1010
</BuildMatrix>
1111
</CDK_Workspace>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cmake/board/avaota-cam.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(CONFIG_ARCH_RISCV32 True)
44
set(CONFIG_ARCH_RISCV32_CORE_E907 True)
55
set(CONFIG_CHIP_SUN300IW1 True)
66
set(CONFIG_CHIP_MMC_V2 True)
7-
set(CONFIG_BOARD_AVAOTA-CAM True)
7+
set(CONFIG_BOARD_AVAOTA-F1 True)
88

99
add_definitions(-DCONFIG_CHIP_SUN300IW1)
1010
add_definitions(-DCONFIG_CHIP_MMC_V2)

0 commit comments

Comments
 (0)