- Using PlatformIO's embedded unit testing with native environment - mbed-dependent .cpp files escaped with #ifndef UNIT_TEST - First tests for charger module added under test/ directory
139 lines
3.8 KiB
INI
139 lines
3.8 KiB
INI
#
|
|
# Project Configuration File
|
|
#
|
|
# A detailed documentation with the EXAMPLES is located here:
|
|
# http://docs.platformio.org/en/latest/projectconf.html
|
|
#
|
|
|
|
[platformio]
|
|
|
|
# Select the charge controller hardware by uncommenting one of the following lines
|
|
|
|
#env_default = libresolar_0_05
|
|
#env_default = libresolar_0_10
|
|
#env_default = cloudsolar_0_2
|
|
#env_default = cloudsolar_0_4
|
|
#env_default = cloudsolar_0_6
|
|
#env_default = pwm_0_1
|
|
#env_default = pwm_0_2
|
|
#env_default = unit_test_native
|
|
|
|
[common]
|
|
|
|
# select specific stm32 version, as automatic updates of mbed could break compatibility
|
|
platform = ststm32@~5.3.0
|
|
#platform = https://github.com/platformio/platform-ststm32.git
|
|
|
|
#upload_protocol = mbed
|
|
upload_protocol = stlink
|
|
#upload_protocol = jlink
|
|
|
|
# Custom Serial Monitor baud rate
|
|
monitor_speed = 115200
|
|
|
|
# Compiler settings
|
|
build_flags =
|
|
-Wl,-Map,memory.map
|
|
-D TURN_OFF_MBED_DEPRECATED_WARNING
|
|
-D MBED_BUILD_PROFILE_RELEASE
|
|
# -D MBED_BUILD_PROFILE_DEBUG
|
|
|
|
lib_deps =
|
|
https://github.com/ThingSet/thingset-cpp
|
|
SX1276GenericLib
|
|
|
|
lib_ignore = USB, mbed-USBDevice, mbed-mbedtls
|
|
|
|
#### BOARD DEFINITIONS ########################################################
|
|
|
|
# https://github.com/LibreSolar/MPPT-Charger_20A/tree/0a19fcb8f3
|
|
[env:libresolar_0_05]
|
|
platform = ${common.platform}
|
|
framework = mbed
|
|
board = nucleo_f072rb
|
|
upload_protocol = ${common.upload_protocol}
|
|
monitor_speed = ${common.monitor_speed}
|
|
build_flags = ${common.build_flags}
|
|
-D PCB_LS_005=1
|
|
lib_deps = ${common.lib_deps}
|
|
lib_ignore = ${common.lib_ignore}
|
|
|
|
# https://github.com/LibreSolar/MPPT-Charger_20A/tree/5bc39183c8
|
|
[env:libresolar_0_10]
|
|
platform = ${common.platform}
|
|
framework = mbed
|
|
board = nucleo_f072rb
|
|
upload_protocol = ${common.upload_protocol}
|
|
monitor_speed = ${common.monitor_speed}
|
|
build_flags = ${common.build_flags}
|
|
-D PCB_LS_010=1
|
|
lib_deps = ${common.lib_deps}
|
|
lib_ignore = ${common.lib_ignore}
|
|
|
|
# https://github.com/LibreSolar/MPPT-Charger_10A/tree/586626f3d8
|
|
[env:cloudsolar_0_2]
|
|
platform = ${common.platform}
|
|
framework = mbed
|
|
board = nucleo_f072rb
|
|
upload_protocol = ${common.upload_protocol}
|
|
monitor_speed = ${common.monitor_speed}
|
|
build_flags = ${common.build_flags}
|
|
-D PCB_CS_02=1
|
|
lib_deps = ${common.lib_deps}
|
|
lib_ignore = ${common.lib_ignore}
|
|
|
|
# https://github.com/LibreSolar/MPPT-Charger_10A/tree/63e5842671
|
|
[env:cloudsolar_0_4]
|
|
platform = ${common.platform}
|
|
framework = mbed
|
|
board = nucleo_l073rz
|
|
upload_protocol = ${common.upload_protocol}
|
|
monitor_speed = ${common.monitor_speed}
|
|
build_flags = ${common.build_flags}
|
|
-D PCB_CS_04=1
|
|
lib_deps = ${common.lib_deps}
|
|
lib_ignore = ${common.lib_ignore}
|
|
|
|
[env:cloudsolar_0_6]
|
|
platform = ${common.platform}
|
|
framework = mbed
|
|
board = nucleo_l073rz
|
|
upload_protocol = ${common.upload_protocol}
|
|
monitor_speed = ${common.monitor_speed}
|
|
build_flags = ${common.build_flags}
|
|
-D PCB_CS_06=1
|
|
lib_deps = ${common.lib_deps}
|
|
lib_ignore = ${common.lib_ignore}
|
|
|
|
# initial test version (obsolete)
|
|
[env:pwm_0_1]
|
|
platform = ${common.platform}
|
|
framework = mbed
|
|
board = nucleo_l073rz
|
|
upload_protocol = ${common.upload_protocol}
|
|
monitor_speed = ${common.monitor_speed}
|
|
build_flags = ${common.build_flags}
|
|
-D PCB_PWM_01=1
|
|
lib_deps = ${common.lib_deps}
|
|
lib_ignore = ${common.lib_ignore}
|
|
|
|
# https://github.com/LibreSolar/PWM-Charger_20A
|
|
[env:pwm_0_2]
|
|
platform = ${common.platform}
|
|
framework = mbed
|
|
board = nucleo_l073rz
|
|
upload_protocol = ${common.upload_protocol}
|
|
monitor_speed = ${common.monitor_speed}
|
|
build_flags = ${common.build_flags}
|
|
-D PCB_PWM_02=1
|
|
lib_deps = ${common.lib_deps}
|
|
lib_ignore = ${common.lib_ignore}
|
|
|
|
[env:unit_test_native]
|
|
platform = native
|
|
build_flags =
|
|
-D LITTLE_ENDIAN
|
|
-D UNIT_TEST
|
|
# include src directory (otherwise unit-tests will only include lib directory)
|
|
test_build_project_src = true
|
|
lib_ignore = USB, mbed-USBDevice, mbed-mbedtls, USBSerial, ESP32, Adafruit_GFX |