Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 47 additions & 30 deletions firmware/MedButton/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,70 @@
"-g",
"-Wall"
],
"mtbGccDefaultIncludePath": [
"mtbDefaultIncludePath": [
".",
"./OnethinxCore",
"../mtb_shared/TARGET_CY8CKIT-062-BLE/latest-v2.X",
"../mtb_shared/capsense/latest-v2.X",
"../mtb_shared/core-lib/latest-v1.X",
"../mtb_shared/core-lib/latest-v1.X/include",
"../mtb_shared/freertos/latest-v10.X",
"../mtb_shared/freertos/latest-v10.X/Source",
"../mtb_shared/freertos/latest-v10.X/Source/include",
"../mtb_shared/freertos/latest-v10.X/Source/portable",
"../mtb_shared/freertos/latest-v10.X/Source/portable/TOOLCHAIN_GCC_ARM",
"../mtb_shared/freertos/latest-v10.X/Source/portable/TOOLCHAIN_GCC_ARM/CM4F",
"../mtb_shared/mtb-hal-cat1/latest-v1.X",
"../mtb_shared/mtb-hal-cat1/latest-v1.X/COMPONENT_PSOC6HAL",
"../mtb_shared/mtb-hal-cat1/latest-v1.X/COMPONENT_PSOC6HAL/include",
"../mtb_shared/mtb-hal-cat1/latest-v1.X/COMPONENT_PSOC6HAL/include/pin_packages",
"../mtb_shared/mtb-hal-cat1/latest-v1.X/COMPONENT_PSOC6HAL/include/triggers",
"../mtb_shared/mtb-hal-cat1/latest-v1.X/include",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/cmsis",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/cmsis/include",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/devices",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/devices/COMPONENT_CAT1A",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/devices/COMPONENT_CAT1A/include",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/devices/COMPONENT_CAT1A/include/ip",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/drivers",
"../mtb_shared/mtb-pdl-cat1/latest-v2.X/drivers/include",
"../mtb_shared/retarget-io/latest-v1.X",
"../mtb_shared/abstraction-rtos/release-v1.4.0",
"../mtb_shared/abstraction-rtos/release-v1.4.0/include",
"../mtb_shared/abstraction-rtos/release-v1.4.0/include/COMPONENT_FREERTOS",
"../mtb_shared/abstraction-rtos/release-v1.4.0/include/Template",
"../mtb_shared/bless/release-v3.50.0",
"../mtb_shared/bless/release-v3.50.0/common",
"../mtb_shared/capsense/release-v2.10.0",
"../mtb_shared/clib-support/release-v1.1.0",
"../mtb_shared/clib-support/release-v1.1.0/TOOLCHAIN_GCC_ARM",
"../mtb_shared/core-lib/release-v1.2.0",
"../mtb_shared/core-lib/release-v1.2.0/include",
"../mtb_shared/freertos/release-v10.3.1",
"../mtb_shared/freertos/release-v10.3.1/Source",
"../mtb_shared/freertos/release-v10.3.1/Source/include",
"../mtb_shared/freertos/release-v10.3.1/Source/portable",
"../mtb_shared/freertos/release-v10.3.1/Source/portable/COMPONENT_CM4",
"../mtb_shared/freertos/release-v10.3.1/Source/portable/COMPONENT_CM4/TOOLCHAIN_GCC_ARM",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/COMPONENT_PSOC6HAL",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/COMPONENT_PSOC6HAL/COMPONENT_CAT1A",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/COMPONENT_PSOC6HAL/COMPONENT_CAT1A/include",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/COMPONENT_PSOC6HAL/COMPONENT_CAT1A/include/pin_packages",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/COMPONENT_PSOC6HAL/COMPONENT_CAT1A/include/triggers",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/COMPONENT_PSOC6HAL/include",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/COMPONENT_PSOC6HAL/source",
"../mtb_shared/mtb-hal-cat1/release-v1.6.0/include",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/cmsis",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/cmsis/include",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/devices",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/devices/COMPONENT_CAT1A",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/devices/COMPONENT_CAT1A/include",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/devices/COMPONENT_CAT1A/include/ip",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/drivers",
"../mtb_shared/mtb-pdl-cat1/release-v2.2.0/drivers/include",
"../mtb_shared/retarget-io/release-v1.2.0",
"${config:modustoolbox.toolsPath}/gcc/lib/gcc/arm-none-eabi/9.3.1/include",
"${config:modustoolbox.toolsPath}/gcc/lib/gcc/arm-none-eabi/9.3.1/include-fixed",
"${config:modustoolbox.toolsPath}/gcc/arm-none-eabi/include",
"${config:modustoolbox.toolsPath}/gcc/arm-none-eabi/include/c++/9.3.1",
"${config:modustoolbox.toolsPath}/gcc/arm-none-eabi/include/c++/9.3.1/arm-none-eabi/thumb/v7e-m/fpv4-sp/hard",
"${config:modustoolbox.toolsPath}/gcc/arm-none-eabi/include/c++/9.3.1/arm-none-eabi/thumb/v7e-m/fpv4-sp/softfp",
"${config:modustoolbox.toolsPath}/gcc/arm-none-eabi/include/c++/9.3.1/backward"
],
"mtbGccDefaultDefines": [
"mtbDefaultDefines": [
"CY_USING_HAL",
"CY_APPNAME_MedButton_First",
"CY8C6347BZI_BLD53",
"CY_TARGET_DEVICE=CY8C6347BZI_BLD53",
"TARGET_CY8CKIT_062_BLE",
"CY_TARGET_BOARD=CY8CKIT_062_BLE",
"COMPONENT_BLESS_CONTROLLER",
"COMPONENT_BLESS_HOST",
"COMPONENT_CAT1",
"COMPONENT_CAT1A",
"COMPONENT_CM0P_SLEEP",
"COMPONENT_CM4",
"COMPONENT_CY8CKIT_062_BLE",
"COMPONENT_FREERTOS",
"COMPONENT_PSOC6HAL",
"COMPONENT_RTOS_AWARE",
"COMPONENT_SOFTFP",
"DEBUG",
"__GNUC__"
Expand All @@ -79,14 +96,14 @@
"cStandard": "c99",
"cppStandard": "c++11",
"includePath": [
"${mtbGccDefaultIncludePath}"
"${mtbDefaultIncludePath}"
],
"browse": {
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"defines": [
"${mtbGccDefaultDefines}"
"${mtbDefaultDefines}"
]
}
]
Expand Down
17 changes: 8 additions & 9 deletions firmware/MedButton/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"openOCDPreConfigLaunchCommands": [
"set PROGRAMMER kitprog3",
"set ENABLE_ACQUIRE 0",
"set ENABLE_CM0 0",
"set ENABLE_CM0 0"
],
"configFiles": [
"openocd.tcl"
Expand All @@ -49,7 +49,6 @@
"set mem inaccessible-by-default off",
"-enable-pretty-printing",
"set remotetimeout 15",
"monitor reset init",
// Comment this next line out if you don't want to reload program
"monitor program {./build/CY8CKIT-062-BLE/Debug/MedButton_First.hex}",
"monitor reset run",
Expand All @@ -58,7 +57,8 @@
],
"numberOfProcessors": 1,
"targetProcessor": 1, // Set to 0 for the CM0+, set to 1 for the CM4
"postStartSessionCommands": [ // Needed if runToMain is false
"postStartSessionCommands": [
// Needed if runToMain is false
// Following two commands are needed to get gdb and openocd and HW all in sync.
// Or, execution context (PC, stack, registers, etc.) look like they are from before reset.
// The stepi, is a pretend instruction that does not actually do a stepi, but MUST be done
Expand Down Expand Up @@ -108,8 +108,7 @@
],
"overrideAttachCommands": [
"set mem inaccessible-by-default off",
"-enable-pretty-printing",
"monitor halt"
"-enable-pretty-printing"
],
"numberOfProcessors": 2,
"targetProcessor": 1, // Set to 0 for the CM0+, set to 1 for the CM4
Expand Down Expand Up @@ -231,9 +230,9 @@
"servertype": "jlink",
"device": "CY8C6xx7_CM0p_sect256KB_tm",
"overrideLaunchCommands": [
"monitor reset 2", // Reset via the reset pin
"monitor flash erase",
"monitor reset 0", // Reset both core and the peripherals
"monitor flash erase",
"monitor reset 2", // Reset via the reset pin
"quit"
],
"showDevDebugOutput": false // When set to true, displays output of GDB.
Expand All @@ -249,9 +248,9 @@
"servertype": "jlink",
"device": "CY8C6xx7_CM0p_sect256KB_tm",
"overrideLaunchCommands": [
"monitor reset 2", // Reset via the reset pin
"-target-download",
"monitor reset 0", // Reset both core and the peripherals
"-target-download",
"monitor reset 2", // Reset via the reset pin
"monitor go",
"quit"
],
Expand Down
2 changes: 1 addition & 1 deletion firmware/MedButton/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//mtb// macOS : $HOME/Library/Application Support/Code/User/settings.json
//mtb// Linux : $HOME/.config/Code/User/settings.json
//mtb//
"modustoolbox.toolsPath": "C:/Users/maksy/ModusToolbox/tools_2.2",
"modustoolbox.toolsPath": "C:/Users/Deer/ModusToolbox/tools_2.3",
"cortex-debug.armToolchainPath": "${config:modustoolbox.toolsPath}/gcc/bin",
"cortex-debug.openocdPath": "${config:modustoolbox.toolsPath}/openocd/bin/openocd"
}
4 changes: 2 additions & 2 deletions firmware/MedButton/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
#define configUSE_QUEUE_SETS 0
#define configUSE_TIME_SLICING 0
#define configENABLE_BACKWARD_COMPATIBILITY 0
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 3

/* Memory allocation related definitions. */
#define configSUPPORT_STATIC_ALLOCATION 1
Expand Down Expand Up @@ -188,7 +188,7 @@ standard names - or at least those used in the unmodified vector table. */
#define HEAP_ALLOCATION_TYPE5 (5) /* heap_5.c*/
#define NO_HEAP_ALLOCATION (0)

#define configHEAP_ALLOCATION_SCHEME (HEAP_ALLOCATION_TYPE3)
#define configHEAP_ALLOCATION_SCHEME (HEAP_ALLOCATION_TYPE4)

/* Check if the ModusToolbox Device Configurator Power personality parameter
* "System Idle Power Mode" is set to either "CPU Sleep" or "System Deep Sleep".
Expand Down
5 changes: 3 additions & 2 deletions firmware/MedButton/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ VERBOSE=
# ... then code in directories named COMPONENT_foo and COMPONENT_bar will be
# added to the build
#
COMPONENTS=FREERTOS RTOS_AWARE
COMPONENTS+=FREERTOS RTOS_AWARE BLESS_CONTROLLER BLESS_HOST

# Like COMPONENTS, but disable optional code that was enabled by default.
DISABLE_COMPONENTS=BSP_DESIGN_MODUS
DISABLE_COMPONENTS=
#BSP_DESIGN_MODUS

# By default the build system automatically looks in the Makefile's directory
# tree for source code and builds it. The SOURCES variable can be used to
Expand Down
8 changes: 3 additions & 5 deletions firmware/MedButton/MedButton_First.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
//mtb// macOS : $HOME/Library/Application Support/Code/User/settings.json
//mtb// Linux : $HOME/.config/Code/User/settings.json
//mtb//
"modustoolbox.toolsPath": "C:/Users/maksy/ModusToolbox/tools_2.2",
"modustoolbox.toolsPath": "C:/Users/Deer/ModusToolbox/tools_2.3",
"cortex-debug.armToolchainPath": "${config:modustoolbox.toolsPath}/gcc/bin",
"cortex-debug.openocdPath": "${config:modustoolbox.toolsPath}/openocd/bin/openocd",
"workbench.colorCustomizations": {
"activityBar.background": "#482133",
"titleBar.activeBackground": "#642E47",
"titleBar.activeForeground": "#FCF9FA"
"files.associations": {
"onethinxcore01.h": "c"
}
}
}
6 changes: 3 additions & 3 deletions firmware/MedButton/OnethinxCore/LoRaWAN_keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
LoRaWAN_keys_t TTN_OTAAkeys = {
.KeyType = OTAA_10x_key,
.PublicNetwork = true,
.OTAA_10x.DevEui = {{ 0x00, 0xE3, 0x52, 0x07, 0xC8, 0x0A, 0x56, 0x90 }},
.OTAA_10x.AppEui = {{ 0x70, 0xB3, 0xD5, 0x7E, 0xD0, 0x02, 0xB6, 0x3A }},
.OTAA_10x.AppKey = {{ 0x8A, 0x9C, 0x9F, 0xAE, 0x12, 0xFE, 0x58, 0x1D, 0xFB, 0xA8, 0x41, 0x0E, 0xD9, 0x2B, 0xCC, 0x0C }}
.OTAA_10x.DevEui = {{ 0x00, 0x3A, 0xB1, 0x24, 0x7C, 0x87, 0x1A, 0x60 }},
.OTAA_10x.AppEui = {{ 0x70, 0xB3, 0xD5, 0x7E, 0xD0, 0x03, 0x99, 0x3B }},
.OTAA_10x.AppKey = {{ 0x3E, 0xB6, 0x2B, 0x9E, 0x19, 0x49, 0x7F, 0xFB, 0xAB, 0x85, 0xEF, 0x54, 0x10, 0xC9, 0x45, 0x85 }}
};

#endif /* LORAWAN_KEYS_H */
Expand Down
Loading