-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added forgotten deploy folder for SDK testing
- Loading branch information
1 parent
10813f9
commit d9cb819
Showing
4 changed files
with
149 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## ./deploy/CMakeLists.txt | ||
add_subdirectory(static_naming_convention_f) |
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,35 @@ | ||
## ./deploy/static_naming_convention_f/CMakeLists.txt | ||
include(utils) | ||
|
||
add_executable(static_naming_convention_f | ||
main.c | ||
ReadMe.txt | ||
) | ||
|
||
set(package_list "") | ||
set(module_list "") | ||
|
||
## TODO - add new modules as implemented | ||
find_include_package(package_list module_list MikroSDK.Driver.ADC) | ||
find_include_package(package_list module_list MikroSDK.Driver.GPIO.In) | ||
find_include_package(package_list module_list MikroSDK.Driver.GPIO.Out) | ||
find_include_package(package_list module_list MikroSDK.Driver.GPIO.Port) | ||
find_include_package(package_list module_list MikroSDK.Driver.I2C.Master) | ||
find_include_package(package_list module_list MikroSDK.Driver.PWM) | ||
find_include_package(package_list module_list MikroSDK.Driver.SPI.Master) | ||
find_include_package(package_list module_list MikroSDK.Driver.UART) | ||
find_include_package(package_list module_list MikroSDK.Driver.OneWire) | ||
find_include_package(package_list module_list MikroSDK.Driver.CAN) | ||
find_include_package(package_list module_list MikroSDK.Driver.DMA) | ||
find_include_package(package_list module_list MikroSDK.Driver.RTC) | ||
|
||
target_link_libraries(static_naming_convention_f | ||
PUBLIC | ||
MikroC.Core | ||
${package_list} | ||
) | ||
|
||
target_compile_definitions(static_naming_convention_f | ||
PUBLIC | ||
${module_list} | ||
) |
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 @@ | ||
Example is meant for testing if all modules build together. | ||
|
||
This has been noticed on XC8 compilers for a specific case: | ||
|
||
+ All modules have same function names (hal_ll_get_specifics) | ||
+ When two or more modules are used, the compiler can not find appropriate reference to function | ||
|
||
We shall run this test on all compilers just in case. | ||
|
||
TODOs in code if new modules are added: | ||
|
||
+ ./deploy/static_naming_convention_f/CMakeLists.txt | ||
+ Call find_include_package(package_list module_list TODO_NEW_PACKAGE_NAME) | ||
+ ./deploy/static_naming_convention_f/main.c | ||
+ Ifdef new module header include and function call |
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,97 @@ | ||
// ------------------------------------------------------------------ INCLUDES | ||
|
||
/** | ||
* Any initialization code needed for MCU to function properly. | ||
* Do not remove this line or clock might not be set correctly. | ||
*/ | ||
#ifdef PREINIT_SUPPORTED | ||
#include "preinit.h" | ||
#endif | ||
|
||
#ifdef MikroSDKDriverADC | ||
#include "drv_analog_in.h" | ||
#endif | ||
#ifdef MikroSDKDriverI2CMaster | ||
#include "drv_i2c_master.h" | ||
#endif | ||
#ifdef MikroSDKDriverDMA | ||
#include "drv_dma.h" | ||
#endif | ||
#ifdef MikroSDKDriverOneWire | ||
#include "drv_one_wire.h" | ||
#endif | ||
#ifdef MikroSDKDriverUART | ||
#include "drv_uart.h" | ||
#endif | ||
#ifdef MikroSDKDriverSPIMaster | ||
#include "drv_spi_master.h" | ||
#endif | ||
#ifdef MikroSDKDriverPWM | ||
#include "drv_pwm.h" | ||
#endif | ||
#ifdef MikroSDKDriverGPIOPort | ||
#include "drv_port.h" | ||
#endif | ||
#ifdef MikroSDKDriverGPIOOut | ||
#include "drv_digital_out.h" | ||
#endif | ||
#ifdef MikroSDKDriverGPIOIn | ||
#include "drv_digital_in.h" | ||
#endif | ||
#ifdef MikroSDKDriverCAN | ||
#include "drv_can.h" | ||
#endif | ||
#ifdef MikroSDKDriverRTC | ||
#include "drv_rtc.h" | ||
#endif | ||
|
||
// ----------------------------------------------------------------- USER CODE | ||
int main( void ) { | ||
/* Do not remove this line or clock might not be set correctly. */ | ||
#ifdef PREINIT_SUPPORTED | ||
preinit(); | ||
#endif | ||
|
||
#ifdef MikroSDKDriverADC | ||
analog_in_set_resolution((void *)0, 0); | ||
#endif | ||
#ifdef MikroSDKDriverI2CMaster | ||
i2c_master_set_speed((void *)0, 0); | ||
#endif | ||
#ifdef MikroSDKDriverDMA | ||
dma_transfer_start((void *)0); | ||
#endif | ||
#ifdef MikroSDKDriverOneWire | ||
one_wire_search_first_device((void *)0, 0); | ||
#endif | ||
#ifdef MikroSDKDriverUART | ||
uart_set_baud((void *)0, 0); | ||
#endif | ||
#ifdef MikroSDKDriverSPIMaster | ||
spi_master_set_speed((void *)0, 0); | ||
#endif | ||
#ifdef MikroSDKDriverPWM | ||
pwm_set_freq((void *)0, 0); | ||
#endif | ||
#ifdef MikroSDKDriverGPIOPort | ||
port_write((void *)0, 0); | ||
#endif | ||
#ifdef MikroSDKDriverGPIOOut | ||
digital_out_toggle((void *)0); | ||
#endif | ||
#ifdef MikroSDKDriverGPIOIn | ||
digital_in_read((void *)0); | ||
#endif | ||
#ifdef MikroSDKDriverCAN | ||
can_transmit((void *)0, (void *)0); | ||
#endif | ||
#ifdef MikroSDKDriverRTC | ||
rtc_set_time((void *)0); | ||
#endif | ||
|
||
while(1); | ||
|
||
return 0; | ||
} | ||
|
||
// ----------------------------------------------------------------------- END |