diff --git a/Inc/config.h b/Inc/config.h
index 730c4c8..d9641f0 100644
--- a/Inc/config.h
+++ b/Inc/config.h
@@ -22,9 +22,13 @@
#define CONFIG_H
/* ==================================== VARIANT SELECTION ==================================== */
+// PlatformIO: uncomment desired variant in platformio.ini
+// Keil uVision: select desired variant from the Target drop down menu (to the right of the Load button)
+// Ubuntu: define the desired build variant here if you want to use make in console
+// or use VARIANT environment variable for example like "make -e VARIANT=VARIANT_DEBUG". Select only one at a time.
#if !defined(PLATFORMIO)
- #define VARIANT_DEBUG // Variant for debugging and checking the capabilities of the side-board
- //#define VARIANT_HOVERBOARD // Variant for using the side-boards connected to the Hoverboard mainboard
+ // #define VARIANT_DEBUG // Variant for debugging and checking the capabilities of the side-board
+ // #define VARIANT_HOVERBOARD // Variant for using the side-boards connected to the Hoverboard mainboard
#endif
/* ==================================== DO NOT TOUCH SETTINGS ==================================== */
diff --git a/MDK-ARM/sideboard-hack.uvopt b/MDK-ARM/sideboard-hack.uvopt
index 41515ef..9f5f0f6 100644
--- a/MDK-ARM/sideboard-hack.uvopt
+++ b/MDK-ARM/sideboard-hack.uvopt
@@ -22,7 +22,7 @@
- sideboard-hack
+ VARIANT_DEBUG
0x4
ARM-ADS
@@ -168,6 +168,153 @@
+
+ VARIANT_HOVERBOARD
+ 0x4
+ ARM-ADS
+
+ 8000000
+
+ 1
+ 0
+ 1
+ 0
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\Listings\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 0
+
+ 0
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 5
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U -O207 -S0 -C0 -A0 -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0GD32F1x0_32 -FS08000000 -FL08000
+
+
+ 0
+ UL2CM3
+ UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0GD32F1x0_32 -FS08000000 -FL08000)
+
+
+
+
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
Startup
0
@@ -530,7 +677,7 @@
Src
- 1
+ 0
0
0
0
diff --git a/MDK-ARM/sideboard-hack.uvproj b/MDK-ARM/sideboard-hack.uvproj
index 1773456..6556711 100644
--- a/MDK-ARM/sideboard-hack.uvproj
+++ b/MDK-ARM/sideboard-hack.uvproj
@@ -7,7 +7,7 @@
- sideboard-hack
+ VARIANT_DEBUG
0x4
ARM-ADS
5060422::V5.06 update 4 (build 422)::ARMCC
@@ -372,7 +372,623 @@
0
- USE_STDPERIPH_DRIVER, GD32F130_150
+ USE_STDPERIPH_DRIVER,GD32F130_150,VARIANT_DEBUG
+
+ ..\Inc;..\Drivers\CMSIS\Include;..\Drivers\CMSIS;..\Drivers\GD32F1x0_standard_peripheral\Include
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x08000000
+ 0x20000000
+
+ .\Objects\sideboard-hack.sct
+
+
+
+
+
+
+
+
+
+
+ Startup
+
+
+ startup_gd32f1x0.s
+ 2
+ .\startup_gd32f1x0.s
+
+
+
+
+ CMSIS
+
+
+ system_gd32f1x0.c
+ 1
+ ..\Drivers\CMSIS\Source\system_gd32f1x0.c
+
+
+
+
+ Peripheral
+
+
+ gd32f1x0_adc.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_adc.c
+
+
+ gd32f1x0_can.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_can.c
+
+
+ gd32f1x0_cec.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_cec.c
+
+
+ gd32f1x0_cmp.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_cmp.c
+
+
+ gd32f1x0_crc.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_crc.c
+
+
+ gd32f1x0_dac.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_dac.c
+
+
+ gd32f1x0_dbg.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_dbg.c
+
+
+ gd32f1x0_dma.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_dma.c
+
+
+ gd32f1x0_exti.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_exti.c
+
+
+ gd32f1x0_fmc.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_fmc.c
+
+
+ gd32f1x0_fwdgt.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_fwdgt.c
+
+
+ gd32f1x0_gpio.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_gpio.c
+
+
+ gd32f1x0_i2c.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_i2c.c
+
+
+ gd32f1x0_ivref.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_ivref.c
+
+
+ gd32f1x0_misc.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_misc.c
+
+
+ gd32f1x0_opa.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_opa.c
+
+
+ gd32f1x0_pmu.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_pmu.c
+
+
+ gd32f1x0_rcu.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_rcu.c
+
+
+ gd32f1x0_rtc.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_rtc.c
+
+
+ gd32f1x0_slcd.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_slcd.c
+
+
+ gd32f1x0_spi.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_spi.c
+
+
+ gd32f1x0_syscfg.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_syscfg.c
+
+
+ gd32f1x0_timer.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_timer.c
+
+
+ gd32f1x0_tsi.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_tsi.c
+
+
+ gd32f1x0_usart.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_usart.c
+
+
+ gd32f1x0_wwdgt.c
+ 1
+ ..\Drivers\GD32F1x0_standard_peripheral\Source\gd32f1x0_wwdgt.c
+
+
+
+
+ Src
+
+
+ gd32f1x0_it.c
+ 1
+ ..\Src\gd32f1x0_it.c
+
+
+ main.c
+ 1
+ ..\Src\main.c
+
+
+ setup.c
+ 1
+ ..\Src\setup.c
+
+
+ systick.c
+ 1
+ ..\Src\systick.c
+
+
+ util.c
+ 1
+ ..\Src\util.c
+
+
+ i2c_it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