-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Gen3] Replace PLATFORM_ID checks with HAL macros in dynalib #2500
base: develop
Are you sure you want to change the base?
Conversation
@@ -2,6 +2,9 @@ | |||
TARGET_SPARK_SERVICES_PATH=$(SERVICES_MODULE_PATH) | |||
|
|||
INCLUDE_DIRS += $(TARGET_SPARK_SERVICES_PATH)/inc | |||
INCLUDE_DIRS += $(PROJECT_ROOT)/hal/src/$(PLATFORM_DYNALIB_MODULES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's better use same pattern as below for nanopb:
include $(PROJECT_ROOT)/hal/import.mk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am including this in the makefile itself, I am running into multiple definition problem -
../../../build/arm/startup/startup_rtl872x.S: Assembler messages:
../../../build/arm/startup/startup_rtl872x.S:160: Warning: ignoring changed section attributes for .text
/usr/local/gcc-arm/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ../../../build/target/lwip/platform-32-m//liblwip.a(init.o): in function `lwip_init':
/Users/keerthyamisagadda/code/device-os/third_party/lwip/lwip/src/core/init.c:333: multiple definition of `lwip_init'; ../../../build/target/lwip/platform-32-m//liblwip.a(init.o):/Users/keerthyamisagadda/code/device-os/third_party/lwip/lwip/src/core/init.c:333: first defined here
/usr/local/gcc-arm/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ../../../build/target/lwip/platform-32-m//liblwip.a(def.o): in function `lwip_htons':
/Users/keerthyamisagadda/code/device-os/third_party/lwip/lwip/src/core/def.c:78: multiple definition of `lwip_htons'; ../../../build/target/lwip/platform-32-m//liblwip.a(def.o):/Users/keerthyamisagadda/code/device-os/third_party/lwip/lwip/src/core/def.c:78: first defined here
/usr/local/gcc-arm/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ../../../build/target/lwip/platform-32-m//liblwip.a(def.o): in function `lwip_htonl':
/Users/keerthyamisagadda/code/device-os/third_party/lwip/lwip/src/core/def.c:93: multiple definition of `lwip_htonl'; ../../../build/target/lwip/platform-32-m//liblwip.a(def.o):/Users/keerthyamisagadda/code/device-os/third_party/lwip/lwip/src/core/def.c:93: first defined here
/usr/local/gcc-arm/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: ../../../build/target/lwip/platform-32-m//liblwip.a(def.o): in function `lwip_strnstr':
hal/inc/hal_platform.h
Outdated
@@ -513,4 +513,8 @@ | |||
#define HAL_PLATFORM_CELLULAR_MODEM_VOLTAGE_TRANSLATOR (1) | |||
#endif // HAL_PLATFORM_CELLULAR_MODEM_VOLTAGE_TRANSLATOR | |||
|
|||
#ifndef HAL_PLAFORM_DYNALIB_DYNAMIC_LOCATION | |||
#define HAL_PLAFORM_DYNALIB_DYNAMIC_LOCATION (0) | |||
#endif // HAL_PLAFORM_DYNALIB_DYNAMIC_LOCATION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling nit: missing a t in platform?
Problem
Replace PLATFORM_ID checks in dynalib header files with HAL macros for compactness
Solution
Define a new macro based on the functionality and include it to the relevant header files through the respective makefiles
Steps to Test
Example App
Build using new platform and test with trackerm hardware:
References
N/A
Completeness