Skip to content

Commit c684462

Browse files
app: move app module to main.c
Replace app module with a top level main.c. Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>
1 parent 7cb2c7a commit c684462

13 files changed

+7
-12
lines changed

app/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ project("Asset Tracker Template")
1212
# Include files that are common for all modules
1313
add_subdirectory(src/common)
1414

15+
# Add main application source
16+
target_sources(app PRIVATE src/main.c)
17+
1518
# Include mandatory module source folders
1619
add_subdirectory(src/modules/network)
1720
add_subdirectory(src/modules/cloud)
1821
add_subdirectory(src/modules/location)
19-
add_subdirectory(src/modules/app)
2022
add_subdirectory(src/modules/fota)
2123
add_subdirectory(src/modules/button)
2224

app/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ config APP_PAYLOAD_CHANNEL_BUFFER_MAX_SIZE
1313
Maximum size of the buffer sent over the payload channel.
1414
Contains encoded CBOR data sampled and encoded in the various modules.
1515

16+
rsource "src/Kconfig.main"
1617
rsource "src/modules/battery/Kconfig.battery"
1718
rsource "src/modules/network/Kconfig.network"
1819
rsource "src/modules/cloud/Kconfig.cloud"
1920
rsource "src/modules/location/Kconfig.location"
2021
rsource "src/modules/led/Kconfig.led"
21-
rsource "src/modules/app/Kconfig.app"
2222
rsource "src/modules/fota/Kconfig.fota"
2323
rsource "src/modules/environmental/Kconfig.environmental"
2424
rsource "src/modules/shell/Kconfig.shell"
File renamed without changes.
File renamed without changes.

app/src/modules/app/CMakeLists.txt

-7
This file was deleted.

tests/module/app/CMakeLists.txt tests/module/main/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ target_sources(app
1717
PRIVATE
1818
src/main.c
1919
src/checks.c
20-
${ASSET_TRACKER_TEMPLATE_DIR}/app/src/modules/app/app.c
20+
${ASSET_TRACKER_TEMPLATE_DIR}/app/src/main.c
2121
${ASSET_TRACKER_TEMPLATE_DIR}/app/src/common/message_channel.c
2222
)
2323

@@ -40,7 +40,7 @@ target_link_options(app PRIVATE --whole-archive)
4040

4141
add_compile_options(-Wno-return-type)
4242

43-
set_property(SOURCE ${ASSET_TRACKER_TEMPLATE_DIR}/app/src/modules/app/app.c PROPERTY COMPILE_FLAGS
43+
set_property(SOURCE ${ASSET_TRACKER_TEMPLATE_DIR}/app/src/main.c PROPERTY COMPILE_FLAGS
4444
"-include ${CMAKE_CURRENT_SOURCE_DIR}/src/redef.h")
4545

4646
# Options that cannot be passed through Kconfig fragments
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/module/app/testcase.yaml tests/module/main/testcase.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests:
2-
asset_tracker_template.fw.app:
2+
asset_tracker_template.fw.main:
33
platform_allow:
44
- native_sim
55
- native_sim/native/64

0 commit comments

Comments
 (0)