-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
# file(READ proj.conf PROJ_CONFIG) | ||
message("PROJ_CONFIG:") | ||
|
||
|
||
|
||
set(SRC_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/proj.conf) | ||
set(TARGET_CONFIG ${CMAKE_CURRENT_BINARY_DIR}/proj.conf) | ||
set(TOP_KCONFIG_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/kconfig) | ||
execute_process( | ||
COMMAND python $ENV{SDK_BASE}/tools/kconfig/genconfig.py ${TOP_KCONFIG_CONFIG} --config-out=${SRC_CONFIG} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
) | ||
|
||
file(COPY ${SRC_CONFIG} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
set(TARGET_CMAKE ${CMAKE_CURRENT_BINARY_DIR}/proj.cmake) | ||
execute_process( | ||
COMMAND python $ENV{SDK_BASE}/tools/kconfig/cmakeconfig.py ${TARGET_CONFIG} ${TARGET_CMAKE} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
) | ||
|
||
include(${TARGET_CMAKE}) | ||
|
||
|
||
message("mcuhex start") | ||
|
||
find_package(qt_idf_sdk REQUIRED HINTS $ENV{SDK_BASE}) | ||
|
||
# sdk_set_linker_script(template.ld) | ||
|
||
|
||
sdk_set_main_file(main.c) | ||
sdk_add_include_directories(.) | ||
|
||
sdk_add_subdirectory_if_exist(mcu) | ||
|
||
project(mcuhex) | ||
|
||
message("mcuhex end") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mainmenu "SDK Configuration" | ||
|
||
config SDK_BASE | ||
string | ||
option env="SDK_BASE" | ||
|
||
source "$SDK_BASE/Kconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
SDK_DEMO_PATH = . | ||
|
||
SDK_BASE ?= $(abspath ../../) | ||
|
||
KCONFIG_CONFIG ?= ${SDK_DEMO_PATH}/proj.conf | ||
|
||
export SDK_BASE | ||
export KCONFIG_CONFIG | ||
|
||
CROSS_COMPILE ?= | ||
#cmake definition config | ||
cmake_definition+= -DCROSS_COMPILE=${CROSS_COMPILE} | ||
|
||
include $(SDK_BASE)/project.build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include<stdio.h> | ||
#include<stdlib.h> | ||
|
||
#include "wifi.h" | ||
|
||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
wifi_protocol_init(); | ||
|
||
char test_cmd[] = {0x55, 0x0B, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68}; | ||
uart_receive_buff_input((unsigned char *)test_cmd, sizeof(test_cmd)); | ||
|
||
while(1) | ||
{ | ||
wifi_uart_service(); | ||
} | ||
printf("Hello, World!\n"); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
message("mcu") | ||
|
||
sdk_generate_library() | ||
file(GLOB_RECURSE SOURCES ./*.c) | ||
sdk_library_add_sources(${SOURCES}) | ||
sdk_add_include_directories(.) |
Oops, something went wrong.