diff --git a/.gitignore b/.gitignore
index c6127b3..263d208 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,52 +1,54 @@
-# Prerequisites
-*.d
-
-# Object files
-*.o
-*.ko
-*.obj
-*.elf
-
-# Linker output
-*.ilk
-*.map
-*.exp
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Libraries
-*.lib
-*.a
-*.la
-*.lo
-
-# Shared objects (inc. Windows DLLs)
-*.dll
-*.so
-*.so.*
-*.dylib
-
-# Executables
-*.exe
-*.out
-*.app
-*.i*86
-*.x86_64
-*.hex
-
-# Debug files
-*.dSYM/
-*.su
-*.idb
-*.pdb
-
-# Kernel Module Compile Results
-*.mod*
-*.cmd
-.tmp_versions/
-modules.order
-Module.symvers
-Mkfile.old
-dkms.conf
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Kernel Module Compile Results
+*.mod*
+*.cmd
+.tmp_versions/
+modules.order
+Module.symvers
+Mkfile.old
+dkms.conf
+
+.vscode/
\ No newline at end of file
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
new file mode 100644
index 0000000..b1f27e8
--- /dev/null
+++ b/.vscode/c_cpp_properties.json
@@ -0,0 +1,16 @@
+{
+ "configurations": [
+ {
+ "name": "Win32",
+ "includePath": [
+ "${workspaceFolder}/**"
+ ],
+ "defines": [
+ "_DEBUG",
+ "UNICODE",
+ "_UNICODE"
+ ]
+ }
+ ],
+ "version": 4
+}
\ No newline at end of file
diff --git a/GPS_DRIVERS/.cproject b/GPS_DRIVERS/.cproject
new file mode 100644
index 0000000..2971389
--- /dev/null
+++ b/GPS_DRIVERS/.cproject
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GPS_DRIVERS/.mxproject b/GPS_DRIVERS/.mxproject
new file mode 100644
index 0000000..3b49a9d
--- /dev/null
+++ b/GPS_DRIVERS/.mxproject
@@ -0,0 +1,25 @@
+[PreviousLibFiles]
+LibFiles=Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_i2c.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_i2c.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal.h;Drivers\STM32L1xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_def.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_rcc.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_rcc_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_bus.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_rcc.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_crs.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_system.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_utils.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_flash.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_flash_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_flash_ramfunc.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_gpio.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_gpio_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_gpio.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_dma_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_dma.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_dma.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_pwr.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_pwr_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_pwr.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_cortex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_cortex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_exti.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_exti.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_tim.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_tim_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_uart.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_usart.h;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_i2c.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_rcc.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_rcc_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash_ramfunc.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_gpio.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_dma.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_pwr.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_pwr_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_cortex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_exti.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_tim.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_tim_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_uart.c;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_i2c.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_i2c.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal.h;Drivers\STM32L1xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_def.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_rcc.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_rcc_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_bus.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_rcc.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_crs.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_system.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_utils.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_flash.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_flash_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_flash_ramfunc.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_gpio.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_gpio_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_gpio.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_dma_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_dma.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_dma.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_pwr.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_pwr_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_pwr.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_cortex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_cortex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_exti.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_exti.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_tim.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_tim_ex.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_hal_uart.h;Drivers\STM32L1xx_HAL_Driver\Inc\stm32l1xx_ll_usart.h;Drivers\CMSIS\Device\ST\STM32L1xx\Include\stm32l152xe.h;Drivers\CMSIS\Device\ST\STM32L1xx\Include\stm32l1xx.h;Drivers\CMSIS\Device\ST\STM32L1xx\Include\system_stm32l1xx.h;Drivers\CMSIS\Device\ST\STM32L1xx\Source\Templates\system_stm32l1xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h;
+
+[PreviousUsedCubeIDEFiles]
+SourceFiles=Core\Src\main.c;Core\Src\stm32l1xx_it.c;Core\Src\stm32l1xx_hal_msp.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_i2c.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_rcc.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_rcc_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash_ramfunc.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_gpio.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_dma.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_pwr.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_pwr_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_cortex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_exti.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_tim.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_tim_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_uart.c;Drivers\CMSIS\Device\ST\STM32L1xx\Source\Templates\system_stm32l1xx.c;Core\Src\system_stm32l1xx.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_i2c.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_rcc.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_rcc_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_flash_ramfunc.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_gpio.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_dma.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_pwr.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_pwr_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_cortex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_exti.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_tim.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_tim_ex.c;Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_uart.c;Drivers\CMSIS\Device\ST\STM32L1xx\Source\Templates\system_stm32l1xx.c;Core\Src\system_stm32l1xx.c;;;
+HeaderPath=Drivers\STM32L1xx_HAL_Driver\Inc;Drivers\STM32L1xx_HAL_Driver\Inc\Legacy;Drivers\CMSIS\Device\ST\STM32L1xx\Include;Drivers\CMSIS\Include;Core\Inc;
+CDefines=USE_HAL_DRIVER;STM32L152xE;USE_HAL_DRIVER;USE_HAL_DRIVER;
+
+[PreviousGenFiles]
+AdvancedFolderStructure=true
+HeaderFileListSize=3
+HeaderFiles#0=..\Core\Inc\stm32l1xx_it.h
+HeaderFiles#1=..\Core\Inc\stm32l1xx_hal_conf.h
+HeaderFiles#2=..\Core\Inc\main.h
+HeaderFolderListSize=1
+HeaderPath#0=..\Core\Inc
+HeaderFiles=;
+SourceFileListSize=3
+SourceFiles#0=..\Core\Src\stm32l1xx_it.c
+SourceFiles#1=..\Core\Src\stm32l1xx_hal_msp.c
+SourceFiles#2=..\Core\Src\main.c
+SourceFolderListSize=1
+SourcePath#0=..\Core\Src
+SourceFiles=;
+
diff --git a/GPS_DRIVERS/.project b/GPS_DRIVERS/.project
new file mode 100644
index 0000000..74e4f86
--- /dev/null
+++ b/GPS_DRIVERS/.project
@@ -0,0 +1,32 @@
+
+
+ GPS_DRIVERS
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ com.st.stm32cube.ide.mcu.MCUProjectNature
+ com.st.stm32cube.ide.mcu.MCUCubeProjectNature
+ org.eclipse.cdt.core.cnature
+ com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature
+ com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature
+ com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature
+ com.st.stm32cube.ide.mcu.MCURootProjectNature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/GPS_DRIVERS/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs b/GPS_DRIVERS/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
new file mode 100644
index 0000000..98a69fc
--- /dev/null
+++ b/GPS_DRIVERS/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
diff --git a/GPS_DRIVERS/.settings/language.settings.xml b/GPS_DRIVERS/.settings/language.settings.xml
new file mode 100644
index 0000000..d1af92d
--- /dev/null
+++ b/GPS_DRIVERS/.settings/language.settings.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GPS_DRIVERS/.settings/stm32cubeide.project.prefs b/GPS_DRIVERS/.settings/stm32cubeide.project.prefs
new file mode 100644
index 0000000..f489ded
--- /dev/null
+++ b/GPS_DRIVERS/.settings/stm32cubeide.project.prefs
@@ -0,0 +1,5 @@
+635E684B79701B039C64EA45C3F84D30=1A939CABBB88A3663958E56CF4748F57
+66BE74F758C12D739921AEA421D593D3=0
+8DF89ED150041C4CBC7CB9A9CAA90856=C9D8D67AD006D7107F8B5EB7AA47F88D
+DC22A860405A8BF2F2C095E5B6529F12=9FA0E749C26A7524EBA32EE38D54C304
+eclipse.preferences.version=1
diff --git a/GPS_DRIVERS/Core/Inc/M8N.h b/GPS_DRIVERS/Core/Inc/M8N.h
new file mode 100644
index 0000000..c39cce6
--- /dev/null
+++ b/GPS_DRIVERS/Core/Inc/M8N.h
@@ -0,0 +1,103 @@
+/*
+ * M8N.h
+ *
+ * Created on: Oct 13, 2023
+ * Author: Nathan Ante
+ */
+
+
+#ifndef INC_M8N_H_
+#define INC_M8N_H_
+
+#include
+
+/*-------------- Private Macros --------------*/
+#define GPS_DEVICE_ADDRESS (0x42 << 1) // GPS device address is 0x42, left-shifted for STM32 uses 7-bit address
+#define GPS_DATA_REGISTER 0xFF // register address for GPS data stream
+
+// In case for "random access" read from i2c (refer to page 38 of data sheet)
+#define GPS_DATA_LENGTH_HIGH 0xFD // register address for GPS data length (high byte)
+#define GPS_DATA_LENGTH_LOW 0xFE // register address for GPS data length (low byte)
+
+/*
+ * This struct consists of the values parsed from the message rectrieved from the receiver.
+ * Created an identifier called NavData for ease of use
+ */
+typedef struct UBX_M8N_NAV_POSLLH {
+ uint32_t iTOW; // GPS time of week of the navigation epoch (ms)
+ int32_t lon; // Longitude (deg)
+ int32_t lat; // Latitude (deg)
+ int32_t height; // Height above ellipsoid (mm)
+ int32_t hMSL; // Height above mean sea level (mm)
+ uint32_t hAcc; // Horizontal accuracy estimate (mm)
+ uint32_t vAcc; // Vertical accuracy estimate (mm)
+} NavData;
+
+/* This function parses the payload retreived from the NAV_POSLLH message and
+ * stores the values in the NAV_POSLLH_Data struct object. These are real world values,
+ * description and units for these values are commented in the struct declaration above.
+ *
+ * Arguments:
+ * pointer to buffer
+ *
+ * Refer to U-Blox 8 / U-Blox M8 Receiver desciption and protocol specification
+ * Section 32.17.16 UBX-NAV-POSLLH (0x01 0x02)
+ * Page 374
+ */
+void UBX_M8N_NAV_POSLLH_Parsing(uint8_t *buffer, NavData* data);
+
+/* This function validates the data retrieved from the GPS receiver using a checksum.
+ * Checksum is calculated over the message, starting and including CLASS field byte up
+ * until but not including the Checksum field bytes. After calculating the checksum from
+ * the message payload, compare with CHECKSUM fields in buffer, if equal then data from
+ * message is valid.
+ *
+ * Arguments:
+ * pointer to buffer(message)
+ * length of buffer
+ *
+ * Returns:
+ * 16 bit unsigned integer / 2 byte checksum
+ * i.e. [CK_A][CK_B] where CK_A and CK_B are 8 bit unsigned integers / byte
+ *
+ * Refer to U-Blox 8 / U-Blox M8 Receiver desciption and protocol specification
+ * Section 32.4 UBX Checksum
+ * Page 171
+ */
+uint16_t UBX_M8N_CHECKSUM(uint8_t *buffer, uint8_t buflen);
+
+
+/* This function sets a desired configuration in the GPS receiver, it does this by transmitting
+ * a UBX-CFG message to the receiver, upon receiving, the receiver will transmit either a
+ * UBX-ACK-ACK message upon successful configuration, or a UBX-ACK-NAK message upon unsuccessful
+ * configuration.
+ *
+ * Arguments:
+ * pointer to buffer(config message)
+ * length of buffer
+ *
+ * No returns, function will terminate program upon unsuccessful configuration
+ *
+ * Refer to U-Blox 8 / U-Blox M8 Receiver desciption and protocol specification
+*/
+void CONFIG_Transmit(uint8_t *buffer, uint16_t buflen);
+
+/* Initialize GPS with our desired configs
+ * i.e. i2c communication with UBX message protocol
+*/
+void GPS_Initialization(void);
+
+/* After writing to the GPS Data Stream Register (i.e. configs and such),
+ * the receiver should store its response in the same register. It also stores
+ * the length of the response on registers 0xFD (high-byte) abd 0xFE (low-byte).
+ *
+ * This function retrieves the length from registers 0xFD and 0xFE and returns it as a uint16_t
+ */
+uint16_t UBX_GET_LENGTH(void);
+
+
+void UBX_Transmit(uint8_t *buffer, uint16_t buflen);
+
+void UBX_Receive(uint8_t *buffer, uint16_t buflen);
+
+#endif /* INC_M8N_H_ */
diff --git a/GPS_DRIVERS/Core/Inc/main.h b/GPS_DRIVERS/Core/Inc/main.h
new file mode 100644
index 0000000..b7ba9af
--- /dev/null
+++ b/GPS_DRIVERS/Core/Inc/main.h
@@ -0,0 +1,72 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : main.h
+ * @brief : Header for main.c file.
+ * This file contains the common defines of the application.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __MAIN_H
+#define __MAIN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32l1xx_hal.h"
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Exported types ------------------------------------------------------------*/
+/* USER CODE BEGIN ET */
+
+/* USER CODE END ET */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN EC */
+
+/* USER CODE END EC */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN EM */
+
+/* USER CODE END EM */
+
+/* Exported functions prototypes ---------------------------------------------*/
+void Error_Handler(void);
+
+/* USER CODE BEGIN EFP */
+
+/* USER CODE END EFP */
+
+/* Private defines -----------------------------------------------------------*/
+#define B1_Pin GPIO_PIN_13
+#define B1_GPIO_Port GPIOC
+#define B1_EXTI_IRQn EXTI15_10_IRQn
+
+/* USER CODE BEGIN Private defines */
+
+/* USER CODE END Private defines */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MAIN_H */
diff --git a/GPS_DRIVERS/Core/Inc/stm32l1xx_hal_conf.h b/GPS_DRIVERS/Core/Inc/stm32l1xx_hal_conf.h
new file mode 100644
index 0000000..50393b5
--- /dev/null
+++ b/GPS_DRIVERS/Core/Inc/stm32l1xx_hal_conf.h
@@ -0,0 +1,318 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32l1xx_hal_conf.h
+ * @brief HAL configuration file.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2017 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __STM32L1xx_HAL_CONF_H
+#define __STM32L1xx_HAL_CONF_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+
+/* ########################## Module Selection ############################## */
+/**
+ * @brief This is the list of modules to be used in the HAL driver
+ */
+
+#define HAL_MODULE_ENABLED
+/*#define HAL_ADC_MODULE_ENABLED */
+/*#define HAL_CRYP_MODULE_ENABLED */
+/*#define HAL_COMP_MODULE_ENABLED */
+/*#define HAL_CRC_MODULE_ENABLED */
+/*#define HAL_CRYP_MODULE_ENABLED */
+/*#define HAL_DAC_MODULE_ENABLED */
+#define HAL_I2C_MODULE_ENABLED
+/*#define HAL_I2S_MODULE_ENABLED */
+/*#define HAL_IRDA_MODULE_ENABLED */
+/*#define HAL_IWDG_MODULE_ENABLED */
+/*#define HAL_LCD_MODULE_ENABLED */
+/*#define HAL_NOR_MODULE_ENABLED */
+/*#define HAL_OPAMP_MODULE_ENABLED */
+/*#define HAL_PCD_MODULE_ENABLED */
+/*#define HAL_RTC_MODULE_ENABLED */
+/*#define HAL_SD_MODULE_ENABLED */
+/*#define HAL_SMARTCARD_MODULE_ENABLED */
+/*#define HAL_SPI_MODULE_ENABLED */
+/*#define HAL_SRAM_MODULE_ENABLED */
+/*#define HAL_TIM_MODULE_ENABLED */
+#define HAL_UART_MODULE_ENABLED
+/*#define HAL_USART_MODULE_ENABLED */
+/*#define HAL_WWDG_MODULE_ENABLED */
+#define HAL_GPIO_MODULE_ENABLED
+#define HAL_EXTI_MODULE_ENABLED
+#define HAL_DMA_MODULE_ENABLED
+#define HAL_RCC_MODULE_ENABLED
+#define HAL_FLASH_MODULE_ENABLED
+#define HAL_PWR_MODULE_ENABLED
+#define HAL_CORTEX_MODULE_ENABLED
+
+/* ########################## Oscillator Values adaptation ####################*/
+/**
+ * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
+ * This value is used by the RCC HAL module to compute the system frequency
+ * (when HSE is used as system clock source, directly or through the PLL).
+ */
+#if !defined (HSE_VALUE)
+ #define HSE_VALUE ((uint32_t)24000000) /*!< Value of the External oscillator in Hz */
+#endif /* HSE_VALUE */
+
+#if !defined (HSE_STARTUP_TIMEOUT)
+ #define HSE_STARTUP_TIMEOUT ((uint32_t)100) /*!< Time out for HSE start up, in ms */
+#endif /* HSE_STARTUP_TIMEOUT */
+
+/**
+ * @brief Internal Multiple Speed oscillator (MSI) default value.
+ * This value is the default MSI range value after Reset.
+ */
+#if !defined (MSI_VALUE)
+ #define MSI_VALUE ((uint32_t)2097000) /*!< Value of the Internal oscillator in Hz*/
+#endif /* MSI_VALUE */
+/**
+ * @brief Internal High Speed oscillator (HSI) value.
+ * This value is used by the RCC HAL module to compute the system frequency
+ * (when HSI is used as system clock source, directly or through the PLL).
+ */
+#if !defined (HSI_VALUE)
+ #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
+#endif /* HSI_VALUE */
+
+/**
+ * @brief Internal Low Speed oscillator (LSI) value.
+ */
+#if !defined (LSI_VALUE)
+ #define LSI_VALUE (37000U) /*!< LSI Typical Value in Hz*/
+#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
+ The real value may vary depending on the variations
+ in voltage and temperature.*/
+
+/**
+ * @brief External Low Speed oscillator (LSE) value.
+ * This value is used by the UART, RTC HAL module to compute the system frequency
+ */
+#if !defined (LSE_VALUE)
+ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/
+#endif /* LSE_VALUE */
+
+#if !defined (LSE_STARTUP_TIMEOUT)
+ #define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */
+#endif /* HSE_STARTUP_TIMEOUT */
+
+/* Tip: To avoid modifying this file each time you need to use different HSE,
+ === you can define the HSE value in your toolchain compiler preprocessor. */
+
+/* ########################### System Configuration ######################### */
+/**
+ * @brief This is the HAL system configuration section
+ */
+
+#define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */
+#define TICK_INT_PRIORITY ((uint32_t)15) /*!< tick interrupt priority */
+#define USE_RTOS 0
+#define PREFETCH_ENABLE 0
+#define INSTRUCTION_CACHE_ENABLE 1
+#define DATA_CACHE_ENABLE 1
+
+/* ########################## Assert Selection ############################## */
+/**
+ * @brief Uncomment the line below to expanse the "assert_param" macro in the
+ * HAL drivers code
+ */
+/* #define USE_FULL_ASSERT 1U */
+
+/* ################## Register callback feature configuration ############### */
+/**
+ * @brief Set below the peripheral configuration to "1U" to add the support
+ * of HAL callback registration/deregistration feature for the HAL
+ * driver(s). This allows user application to provide specific callback
+ * functions thanks to HAL_PPP_RegisterCallback() rather than overwriting
+ * the default weak callback functions (see each stm32l0xx_hal_ppp.h file
+ * for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef
+ * for each PPP peripheral).
+ */
+#define USE_HAL_ADC_REGISTER_CALLBACKS 0U
+#define USE_HAL_COMP_REGISTER_CALLBACKS 0U
+#define USE_HAL_DAC_REGISTER_CALLBACKS 0U
+#define USE_HAL_I2C_REGISTER_CALLBACKS 0U
+#define USE_HAL_I2S_REGISTER_CALLBACKS 0U
+#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U
+#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U
+#define USE_HAL_PCD_REGISTER_CALLBACKS 0U
+#define USE_HAL_RTC_REGISTER_CALLBACKS 0U
+#define USE_HAL_SDMMC_REGISTER_CALLBACKS 0U
+#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U
+#define USE_HAL_SPI_REGISTER_CALLBACKS 0U
+#define USE_HAL_TIM_REGISTER_CALLBACKS 0U
+#define USE_HAL_UART_REGISTER_CALLBACKS 0U
+#define USE_HAL_USART_REGISTER_CALLBACKS 0U
+#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U
+
+/* ################## SPI peripheral configuration ########################## */
+
+/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
+ * Activated: CRC code is present inside driver
+ * Deactivated: CRC code cleaned from driver
+ */
+
+#define USE_SPI_CRC 0U
+/* Includes ------------------------------------------------------------------*/
+/**
+ * @brief Include module's header file
+ */
+
+#ifdef HAL_RCC_MODULE_ENABLED
+ #include "stm32l1xx_hal_rcc.h"
+#endif /* HAL_RCC_MODULE_ENABLED */
+
+#ifdef HAL_GPIO_MODULE_ENABLED
+ #include "stm32l1xx_hal_gpio.h"
+#endif /* HAL_GPIO_MODULE_ENABLED */
+
+#ifdef HAL_DMA_MODULE_ENABLED
+ #include "stm32l1xx_hal_dma.h"
+#endif /* HAL_DMA_MODULE_ENABLED */
+
+#ifdef HAL_CORTEX_MODULE_ENABLED
+ #include "stm32l1xx_hal_cortex.h"
+#endif /* HAL_CORTEX_MODULE_ENABLED */
+
+#ifdef HAL_ADC_MODULE_ENABLED
+ #include "stm32l1xx_hal_adc.h"
+#endif /* HAL_ADC_MODULE_ENABLED */
+
+#ifdef HAL_COMP_MODULE_ENABLED
+ #include "stm32l1xx_hal_comp.h"
+#endif /* HAL_COMP_MODULE_ENABLED */
+
+#ifdef HAL_CRC_MODULE_ENABLED
+ #include "stm32l1xx_hal_crc.h"
+#endif /* HAL_CRC_MODULE_ENABLED */
+
+#ifdef HAL_CRYP_MODULE_ENABLED
+ #include "stm32l1xx_hal_cryp.h"
+#endif /* HAL_CRYP_MODULE_ENABLED */
+
+#ifdef HAL_DAC_MODULE_ENABLED
+ #include "stm32l1xx_hal_dac.h"
+#endif /* HAL_DAC_MODULE_ENABLED */
+
+#ifdef HAL_FLASH_MODULE_ENABLED
+ #include "stm32l1xx_hal_flash.h"
+#endif /* HAL_FLASH_MODULE_ENABLED */
+
+#ifdef HAL_SRAM_MODULE_ENABLED
+ #include "stm32l1xx_hal_sram.h"
+#endif /* HAL_SRAM_MODULE_ENABLED */
+
+#ifdef HAL_NOR_MODULE_ENABLED
+ #include "stm32l1xx_hal_nor.h"
+#endif /* HAL_NOR_MODULE_ENABLED */
+
+#ifdef HAL_I2C_MODULE_ENABLED
+ #include "stm32l1xx_hal_i2c.h"
+#endif /* HAL_I2C_MODULE_ENABLED */
+
+#ifdef HAL_I2S_MODULE_ENABLED
+ #include "stm32l1xx_hal_i2s.h"
+#endif /* HAL_I2S_MODULE_ENABLED */
+
+#ifdef HAL_IWDG_MODULE_ENABLED
+ #include "stm32l1xx_hal_iwdg.h"
+#endif /* HAL_IWDG_MODULE_ENABLED */
+
+#ifdef HAL_LCD_MODULE_ENABLED
+ #include "stm32l1xx_hal_lcd.h"
+#endif /* HAL_LCD_MODULE_ENABLED */
+
+#ifdef HAL_OPAMP_MODULE_ENABLED
+ #include "stm32l1xx_hal_opamp.h"
+#endif /* HAL_OPAMP_MODULE_ENABLED */
+
+#ifdef HAL_PWR_MODULE_ENABLED
+ #include "stm32l1xx_hal_pwr.h"
+#endif /* HAL_PWR_MODULE_ENABLED */
+
+#ifdef HAL_RTC_MODULE_ENABLED
+ #include "stm32l1xx_hal_rtc.h"
+#endif /* HAL_RTC_MODULE_ENABLED */
+
+#ifdef HAL_SD_MODULE_ENABLED
+ #include "stm32l1xx_hal_sd.h"
+#endif /* HAL_SD_MODULE_ENABLED */
+
+#ifdef HAL_SPI_MODULE_ENABLED
+ #include "stm32l1xx_hal_spi.h"
+#endif /* HAL_SPI_MODULE_ENABLED */
+
+#ifdef HAL_TIM_MODULE_ENABLED
+ #include "stm32l1xx_hal_tim.h"
+#endif /* HAL_TIM_MODULE_ENABLED */
+
+#ifdef HAL_UART_MODULE_ENABLED
+ #include "stm32l1xx_hal_uart.h"
+#endif /* HAL_UART_MODULE_ENABLED */
+
+#ifdef HAL_USART_MODULE_ENABLED
+ #include "stm32l1xx_hal_usart.h"
+#endif /* HAL_USART_MODULE_ENABLED */
+
+#ifdef HAL_IRDA_MODULE_ENABLED
+ #include "stm32l1xx_hal_irda.h"
+#endif /* HAL_IRDA_MODULE_ENABLED */
+
+#ifdef HAL_SMARTCARD_MODULE_ENABLED
+ #include "stm32l1xx_hal_smartcard.h"
+#endif /* HAL_SMARTCARD_MODULE_ENABLED */
+
+#ifdef HAL_WWDG_MODULE_ENABLED
+ #include "stm32l1xx_hal_wwdg.h"
+#endif /* HAL_WWDG_MODULE_ENABLED */
+
+#ifdef HAL_PCD_MODULE_ENABLED
+ #include "stm32l1xx_hal_pcd.h"
+#endif /* HAL_PCD_MODULE_ENABLED */
+
+#ifdef HAL_EXTI_MODULE_ENABLED
+ #include "stm32l1xx_hal_exti.h"
+#endif /* HAL_EXTI_MODULE_ENABLED */
+
+/* Exported macro ------------------------------------------------------------*/
+#ifdef USE_FULL_ASSERT
+/**
+ * @brief The assert_param macro is used for function's parameters check.
+ * @param expr: If expr is false, it calls assert_failed function
+ * which reports the name of the source file and the source
+ * line number of the call that failed.
+ * If expr is true, it returns no value.
+ * @retval None
+ */
+ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
+/* Exported functions ------------------------------------------------------- */
+ void assert_failed(uint8_t* file, uint32_t line);
+#else
+ #define assert_param(expr) ((void)0U)
+#endif /* USE_FULL_ASSERT */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STM32L1xx_HAL_CONF_H */
+
diff --git a/GPS_DRIVERS/Core/Inc/stm32l1xx_it.h b/GPS_DRIVERS/Core/Inc/stm32l1xx_it.h
new file mode 100644
index 0000000..3dd3c8b
--- /dev/null
+++ b/GPS_DRIVERS/Core/Inc/stm32l1xx_it.h
@@ -0,0 +1,67 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32l1xx_it.h
+ * @brief This file contains the headers of the interrupt handlers.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __STM32L1xx_IT_H
+#define __STM32L1xx_IT_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Exported types ------------------------------------------------------------*/
+/* USER CODE BEGIN ET */
+
+/* USER CODE END ET */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN EC */
+
+/* USER CODE END EC */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN EM */
+
+/* USER CODE END EM */
+
+/* Exported functions prototypes ---------------------------------------------*/
+void NMI_Handler(void);
+void HardFault_Handler(void);
+void MemManage_Handler(void);
+void BusFault_Handler(void);
+void UsageFault_Handler(void);
+void SVC_Handler(void);
+void DebugMon_Handler(void);
+void PendSV_Handler(void);
+void SysTick_Handler(void);
+void EXTI15_10_IRQHandler(void);
+/* USER CODE BEGIN EFP */
+
+/* USER CODE END EFP */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STM32L1xx_IT_H */
diff --git a/GPS_DRIVERS/Core/Src/M8N.c b/GPS_DRIVERS/Core/Src/M8N.c
new file mode 100644
index 0000000..8665339
--- /dev/null
+++ b/GPS_DRIVERS/Core/Src/M8N.c
@@ -0,0 +1,216 @@
+/*
+ * M8N.c
+ *
+ * Created on: Oct 13, 2023
+ * Author: Nathan Ante
+ */
+#include "M8N.h"
+#include "main.h"
+#include
+#include
+#include
+
+extern I2C_HandleTypeDef hi2c1;
+extern UART_HandleTypeDef huart2;
+extern UART_HandleTypeDef huart1;
+
+/*------------------------------- GPS Functions -------------------------------*/
+uint8_t UBX_CFG_PRT[] = {
+ 0xB5, 0x62, 0x06, 0x00, 0x14, 0x00, // header and class/id bytes and length
+ // payload
+ 0x00, 0x00, // Port Identifier & reserved
+ 0x00, 0x00, // txReady settings
+ 0x42, 0x00, 0x00, 0x00, // I2C mode flags
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x01, 0x00, // inProtoMask
+ 0x01, 0x00, // outProtoMask
+ 0x00, 0x00, // extended TX timeout
+ 0x00, 0x00, // reserved
+ // Checksum bytes (to-be-added)
+ 0xA0, 0x96
+};
+
+uint8_t UBX_CFG_MSG[] = {
+ 0xB5, 0x62, 0x06, 0x01, 0x08, 0x00, // header and class/id bytes and length
+ // payload
+ 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Checksum bytes (to-be-added)
+ 0x13, 0xBF
+};
+
+uint8_t UBX_CFG_RATE[] = {
+ 0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, // header and class/id bytes and length
+ // payload
+ 0xE8, 0x03, // measRate(ms)
+ 0x01, 0x00, // navRate(cycles
+ 0x01, 0x00, // timeRef - 1:GPS time
+ // Checksum bytes (to-be-added)
+ 0x01, 0x39
+};
+
+uint8_t UBX_CFG_RESET[] = {
+ 0xB5, 0x62, 0x06, 0x04, 0x04, 0x00, // header and class/id bytes and length
+ 0xFF, 0xFF, // navBbrMask
+ 0x00, 0x00, // resetMode
+ // checksum
+ 0x0C, 0x5D
+};
+
+// might be used...
+uint8_t UBX_CFG_CFG[] = {
+ 0xB5, 0x62, 0x06, 0x09, 0x0D, 0x00, // header and class/id bytes and length
+ // payload
+ 0xFF, 0xFF, 0x00, 0x00, // clearMask
+ 0x00, 0x00, 0x00, 0x00, // saveMask
+ 0xFF, 0xFF, 0x00, 0x00, // loadMask
+ 0x17, // deviceMask
+ // Checksum bytes (to-be-added)
+ 0x2F, 0xAE
+};
+
+uint8_t UBX_ACK_ACK[] = {
+ 0xB5, 0x62, 0x05, 0x01, 0x02, 0x00, // header and class/id bytes and length
+ 0x00, // classID of the acknowledged message (to-be-added)
+ 0x00, // messageID of the acknowledged message (to-be-added)
+ // Checksum bytes (to-be-added)
+ 0x00, 0x00
+};
+
+/*------------------------------- GPS Functions -------------------------------*/
+
+void UBX_Transmit(uint8_t *buffer, uint16_t buflen) {
+ HAL_StatusTypeDef hal = HAL_I2C_Mem_Write(&hi2c1, GPS_DEVICE_ADDRESS, GPS_DATA_REGISTER, 1, buffer, buflen, 100);
+ if (hal != HAL_OK) {
+ printf("HAL Status: %d | I2C Error: %d | Class and ID: %#X %#X\r\n", hal, hi2c1.ErrorCode, buffer[2], buffer[3]);
+ }
+}
+
+void UBX_Receive(uint8_t *buffer, uint16_t buflen) {
+ HAL_StatusTypeDef hal = HAL_I2C_Mem_Read(&hi2c1, GPS_DEVICE_ADDRESS, GPS_DATA_REGISTER, 1, buffer, buflen, 100);
+ if (hal != HAL_OK) {
+ printf("HAL Status: %d | I2C Error: %d\r\n", hal, hi2c1.ErrorCode);
+ }
+}
+
+
+
+/* This function validates the data retrieved from the GPS receiver using a checksum.
+ * Checksum is calculated over the message, starting and including CLASS field byte up
+ * until but not including the Checksum field bytes.
+ *
+ * Essentially, don't include the first and last 2 bytes of the buffer.
+ *
+ * After calculating the checksum values CK_A and CK_B, return it as a 16 bit unsigned integer
+ * Where CK_A is the high byte, and CK_B is the low byte
+ *
+ * Check documentation if you need more info, details in header file
+ */
+uint16_t UBX_M8N_CHECKSUM(uint8_t* buffer, uint8_t buflen) {
+
+ // These values will be used to compare with the buffer's
+ uint8_t CK_A = 0, CK_B = 0;
+
+ // loop to go through buffer payload
+ // start at index 2 since first two bytes of buffer are not included in checksum calculation
+ // do not include last 2 bytes of buffer since they are also not included in checksum calculation
+ for (int i = 2; i < buflen - 2; i++) {
+ CK_A = CK_A + buffer[i];
+ CK_B = CK_B + CK_A;
+ }
+
+ // After calculating checksum, compare with checksum bytes from buffer
+ // Return 1 if both are equal to buffer checksum, return 0 if not
+ // return ((CK_A == buffer[buflen - 2]) && (CK_B == buffer[buflen - 1]));
+
+ // return 2 byte checksum
+ return ((CK_A<<8) | CK_B);
+}
+
+/* This function parses the payload from a NAV_POSLLH message
+ * The payload is in little endian format, so left shift the bytes
+ * Follow reference from driver and protocol description
+ */
+void UBX_M8N_NAV_POSLLH_Parsing(uint8_t *buffer, NavData* data) {
+ data->iTOW = buffer[9]<<24 | buffer[8]<<16 | buffer[7]<<8 | buffer[6];
+ data->lon = buffer[13]<<24 | buffer[12]<<16 | buffer[11]<<8 | buffer[10];
+ data->lat = buffer[17]<<24 | buffer[16]<<16 | buffer[15]<<8 | buffer[14];
+ data->height = buffer[21]<<24 | buffer[20]<<16 | buffer[19]<<8 | buffer[18];
+ data->hMSL = buffer[25]<<24 | buffer[24]<<16 | buffer[23]<<8 | buffer[22];
+ data->hAcc = buffer[29]<<24 | buffer[28]<<16 | buffer[27]<<8 | buffer[26];
+ data->vAcc = buffer[33]<<24 | buffer[32]<<16 | buffer[31]<<8 | buffer[30];
+}
+
+/* This function sets a desired configuration in the GPS receiver
+ * It takes in a pointer to the configuration message buffer, as well as its size
+ * Calls Error_Handler() if something goes wrong
+*/
+void CONFIG_Transmit(uint8_t* buffer, uint16_t buflen) {
+ HAL_StatusTypeDef hal; // HAL return status
+ printf("Size of config: %d\r\n", buflen);
+
+ // transmit desired CONFIG to GPS receiver
+ hal = HAL_I2C_Mem_Write(&hi2c1, GPS_DEVICE_ADDRESS, GPS_DATA_LENGTH_HIGH, 1, buffer, buflen, HAL_MAX_DELAY);
+ if (hal != HAL_OK) {
+ printf("CONFIG transmit went wrong\r\n");
+ }
+ // get the length of the CONFIG message response
+ uint16_t message_length = UBX_GET_LENGTH();
+ printf("Message Length: %d\r\n", message_length);
+
+ if (message_length != 0) {
+ // create a buffer of
+ uint8_t config_response[message_length];
+ config_response[0] = GPS_DATA_REGISTER;
+
+ // Recieve the CONFIG response
+ hal = HAL_I2C_Master_Receive(&hi2c1, GPS_DEVICE_ADDRESS | 0x01, config_response, message_length, HAL_MAX_DELAY);
+ if (hal != HAL_OK) {
+ printf("CONFIG response went wrong!\r\n");
+ printf("Error code: %08lX\r\n", hi2c1.ErrorCode);
+ } else {
+ printf("Length: %d | Headers: %X %X |Class: %X | ID: %X | rest: %X %X %X %X %X %X\r\n", message_length, config_response[0], config_response[1], config_response[2], config_response[3], config_response[4], config_response[5], config_response[6], config_response[7], config_response[8], config_response[9]);
+ // see if response was a ACK message
+ }
+ }
+}
+
+uint16_t UBX_GET_LENGTH() {
+ uint8_t ubx_length[2];
+ HAL_StatusTypeDef hal = HAL_I2C_Mem_Read(&hi2c1, GPS_DEVICE_ADDRESS | 0x01, GPS_DATA_LENGTH_HIGH, 1, ubx_length, sizeof(ubx_length), 100);
+ if (hal != HAL_OK) {
+ printf("Read for length went wrong");
+ }
+
+ printf("High: %X | Low: %X\r\n",ubx_length[0], ubx_length[1]);
+ // return length as uint16_t
+ return ((ubx_length[0] << 8) | (ubx_length[1]));
+}
+
+void GPS_Initialization(void) {
+ HAL_StatusTypeDef hal;
+ hal = HAL_I2C_Master_Transmit(&hi2c1, GPS_DEVICE_ADDRESS, UBX_CFG_CFG, sizeof(UBX_CFG_CFG), HAL_MAX_DELAY);
+ if (hal != HAL_OK) {
+ // something went wrong with transmit (exit)
+ printf("UBX-CFG-CFG went wrong!\r\n");
+ }
+ HAL_Delay(2000);
+
+ printf("Starting MSG\r\n");
+ CONFIG_Transmit(UBX_CFG_MSG, sizeof(UBX_CFG_MSG)/sizeof(UBX_CFG_MSG[0]));
+ HAL_Delay(1000);
+
+ printf("Starting PRT\r\n");
+ CONFIG_Transmit(UBX_CFG_PRT, sizeof(UBX_CFG_PRT)/sizeof(UBX_CFG_PRT[0]));
+ HAL_Delay(1000);
+
+// uint8_t test2[] = "msg CONFIG STARTS here\r\n";
+// HAL_UART_Transmit(&huart1, test2, sizeof(test2), HAL_MAX_DELAY);
+
+// uint8_t test3[] = "rate CONFIG STARTS here\r\n";
+// HAL_UART_Transmit(&huart1, test3, sizeof(test3), HAL_MAX_DELAY);
+ printf("Starting RATE\r\n");
+ CONFIG_Transmit(UBX_CFG_RATE, sizeof(UBX_CFG_RATE)/sizeof(UBX_CFG_RATE[0]));
+ HAL_Delay(1000);
+}
+
+/*------------------------------- Extra Functions for testing purposes -------------------------------*/
diff --git a/GPS_DRIVERS/Core/Src/main.c b/GPS_DRIVERS/Core/Src/main.c
new file mode 100644
index 0000000..228f749
--- /dev/null
+++ b/GPS_DRIVERS/Core/Src/main.c
@@ -0,0 +1,387 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file : main.c
+ * @brief : Main program body
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+#include
+#include
+#include "M8N.h"
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN PTD */
+
+/* USER CODE END PTD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN PD */
+
+/* USER CODE END PD */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+#define BUFFER_SIZE 36
+/* USER CODE END PM */
+
+/* Private variables ---------------------------------------------------------*/
+I2C_HandleTypeDef hi2c1;
+
+UART_HandleTypeDef huart1;
+UART_HandleTypeDef huart2;
+
+/* USER CODE BEGIN PV */
+uint8_t GPS_FLAG = 0; // flag for successful i2c connection
+//static uint8_t GPS_DATA = 0; // flag for complete UBX message received
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+void SystemClock_Config(void);
+static void MX_GPIO_Init(void);
+static void MX_I2C1_Init(void);
+static void MX_USART2_UART_Init(void);
+static void MX_USART1_UART_Init(void);
+/* USER CODE BEGIN PFP */
+#ifdef __GNUC__
+#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
+#else
+#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
+#endif
+
+PUTCHAR_PROTOTYPE
+{
+ HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, HAL_MAX_DELAY);
+ return ch;
+}
+/* USER CODE END PFP */
+
+/* Private user code ---------------------------------------------------------*/
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/**
+ * @brief The application entry point.
+ * @retval int
+ */
+int main(void)
+{
+ /* USER CODE BEGIN 1 */
+ HAL_StatusTypeDef hal; // HAL status return
+ uint8_t GPS_BUFFER[36]; // buffer for full UBX(GPS) message
+ NavData data; // Struct for parsed data received from gps
+ /* USER CODE END 1 */
+
+ /* MCU Configuration--------------------------------------------------------*/
+
+ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
+ HAL_Init();
+
+ /* USER CODE BEGIN Init */
+
+ /* USER CODE END Init */
+
+ /* Configure the system clock */
+ SystemClock_Config();
+
+ /* USER CODE BEGIN SysInit */
+
+ /* USER CODE END SysInit */
+
+ /* Initialize all configured peripherals */
+ MX_GPIO_Init();
+ MX_I2C1_Init();
+ MX_USART2_UART_Init();
+ MX_USART1_UART_Init();
+ /* USER CODE BEGIN 2 */
+
+ // Setup GPS receiver with desired configurations
+ printf("Starting configurations\r\n");
+ GPS_Initialization();
+ printf("Configurations complete\r\n");
+ /* USER CODE END 2 */
+
+ /* Infinite loop */
+ /* USER CODE BEGIN WHILE */
+ while (1)
+ {
+ // set first element of buffer as the address of data stream register
+ // If GPS_BUFFER == 0xFF, then it means that there is no data for the GPS to send
+ GPS_BUFFER[0] = GPS_DATA_REGISTER;
+
+ // Transmit to GPS, let it know I want data
+ hal = HAL_I2C_Master_Transmit(&hi2c1, GPS_DEVICE_ADDRESS, GPS_BUFFER, BUFFER_SIZE, HAL_MAX_DELAY);
+ if ( hal != HAL_OK ) {
+ printf("data transmit went wrong\r\n");
+ }
+
+ // if HAL_OK then receive data
+ // set bit zero on device address for read access
+ hal = HAL_I2C_Master_Receive(&hi2c1, GPS_DEVICE_ADDRESS | 0x01, GPS_BUFFER, BUFFER_SIZE, HAL_MAX_DELAY);
+ if ( hal != HAL_OK ) {
+ printf("data receive went wrong\r\n");
+ }
+
+ // buffer[0] == 0xff when there is no data
+ if (GPS_BUFFER[0] != 0xff) {
+
+ // call Checksum function to retrieve computed checksum of the buffer's payload
+ uint16_t computedChecksum = UBX_M8N_CHECKSUM(GPS_BUFFER, BUFFER_SIZE);
+
+ // expected checksum value is the last 2 bytes of the buffer
+ uint16_t expectedChecksum = (GPS_BUFFER[BUFFER_SIZE - 2]<<8) | GPS_BUFFER[BUFFER_SIZE - 1];
+
+ // if computed checksum = expected checksum, then data is valid
+ if (computedChecksum == expectedChecksum) {
+ UBX_M8N_NAV_POSLLH_Parsing(GPS_BUFFER, &data); // parses data
+ HAL_UART_Transmit(&huart2, GPS_BUFFER, BUFFER_SIZE, HAL_MAX_DELAY); // transmit data to pc through UART (for testing)
+ } else {
+ // The data received from GPS is invalid
+ printf("The checksum is invalid!\r\n");
+ // uint8_t test[] = "The checksum is invalid!\r\n";
+ // HAL_UART_Transmit(&huart1, test, sizeof(test), HAL_MAX_DELAY);
+ }
+ } else {
+ // The GPS does not have data to send over
+ printf("There is no data!\r\n");
+ }
+
+ HAL_Delay(500);
+// }
+ /* USER CODE END WHILE */
+
+ /* USER CODE BEGIN 3 */
+ }
+ /* USER CODE END 3 */
+}
+
+/**
+ * @brief System Clock Configuration
+ * @retval None
+ */
+void SystemClock_Config(void)
+{
+ RCC_OscInitTypeDef RCC_OscInitStruct = {0};
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
+
+ /** Configure the main internal regulator output voltage
+ */
+ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI;
+ RCC_OscInitStruct.MSIState = RCC_MSI_ON;
+ RCC_OscInitStruct.MSICalibrationValue = 0;
+ RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_5;
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
+ {
+ Error_Handler();
+ }
+
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
+ |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_MSI;
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
+ {
+ Error_Handler();
+ }
+}
+
+/**
+ * @brief I2C1 Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_I2C1_Init(void)
+{
+
+ /* USER CODE BEGIN I2C1_Init 0 */
+
+ /* USER CODE END I2C1_Init 0 */
+
+ /* USER CODE BEGIN I2C1_Init 1 */
+
+ /* USER CODE END I2C1_Init 1 */
+ hi2c1.Instance = I2C1;
+ hi2c1.Init.ClockSpeed = 100000;
+ hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
+ hi2c1.Init.OwnAddress1 = 0;
+ hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
+ hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
+ hi2c1.Init.OwnAddress2 = 0;
+ hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
+ hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
+ if (HAL_I2C_Init(&hi2c1) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN I2C1_Init 2 */
+
+ /* USER CODE END I2C1_Init 2 */
+
+}
+
+/**
+ * @brief USART1 Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_USART1_UART_Init(void)
+{
+
+ /* USER CODE BEGIN USART1_Init 0 */
+
+ /* USER CODE END USART1_Init 0 */
+
+ /* USER CODE BEGIN USART1_Init 1 */
+
+ /* USER CODE END USART1_Init 1 */
+ huart1.Instance = USART1;
+ huart1.Init.BaudRate = 9600;
+ huart1.Init.WordLength = UART_WORDLENGTH_8B;
+ huart1.Init.StopBits = UART_STOPBITS_1;
+ huart1.Init.Parity = UART_PARITY_NONE;
+ huart1.Init.Mode = UART_MODE_TX;
+ huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ huart1.Init.OverSampling = UART_OVERSAMPLING_16;
+ if (HAL_UART_Init(&huart1) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN USART1_Init 2 */
+
+ /* USER CODE END USART1_Init 2 */
+
+}
+
+/**
+ * @brief USART2 Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_USART2_UART_Init(void)
+{
+
+ /* USER CODE BEGIN USART2_Init 0 */
+
+ /* USER CODE END USART2_Init 0 */
+
+ /* USER CODE BEGIN USART2_Init 1 */
+
+ /* USER CODE END USART2_Init 1 */
+ huart2.Instance = USART2;
+ huart2.Init.BaudRate = 9600;
+ huart2.Init.WordLength = UART_WORDLENGTH_8B;
+ huart2.Init.StopBits = UART_STOPBITS_1;
+ huart2.Init.Parity = UART_PARITY_NONE;
+ huart2.Init.Mode = UART_MODE_TX_RX;
+ huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ huart2.Init.OverSampling = UART_OVERSAMPLING_16;
+ if (HAL_UART_Init(&huart2) != HAL_OK)
+ {
+ Error_Handler();
+ }
+ /* USER CODE BEGIN USART2_Init 2 */
+
+ /* USER CODE END USART2_Init 2 */
+
+}
+
+/**
+ * @brief GPIO Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_GPIO_Init(void)
+{
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+/* USER CODE BEGIN MX_GPIO_Init_1 */
+/* USER CODE END MX_GPIO_Init_1 */
+
+ /* GPIO Ports Clock Enable */
+ __HAL_RCC_GPIOC_CLK_ENABLE();
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+
+ /*Configure GPIO pin : B1_Pin */
+ GPIO_InitStruct.Pin = B1_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
+
+ /* EXTI interrupt init*/
+ HAL_NVIC_SetPriority(EXTI15_10_IRQn, 0, 0);
+ HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
+
+/* USER CODE BEGIN MX_GPIO_Init_2 */
+/* USER CODE END MX_GPIO_Init_2 */
+}
+
+/* USER CODE BEGIN 4 */
+void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
+{
+ if(GPIO_Pin == B1_Pin) {
+ GPS_FLAG = 1;
+ } else {
+ __NOP();
+ }
+}
+/* USER CODE END 4 */
+
+/**
+ * @brief This function is executed in case of error occurrence.
+ * @retval None
+ */
+void Error_Handler(void)
+{
+ /* USER CODE BEGIN Error_Handler_Debug */
+ /* User can add his own implementation to report the HAL error return state */
+ __disable_irq();
+ while (1)
+ {
+ }
+ /* USER CODE END Error_Handler_Debug */
+}
+
+#ifdef USE_FULL_ASSERT
+/**
+ * @brief Reports the name of the source file and the source line number
+ * where the assert_param error has occurred.
+ * @param file: pointer to the source file name
+ * @param line: assert_param error line source number
+ * @retval None
+ */
+void assert_failed(uint8_t *file, uint32_t line)
+{
+ /* USER CODE BEGIN 6 */
+ /* User can add his own implementation to report the file name and line number,
+ ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
+ /* USER CODE END 6 */
+}
+#endif /* USE_FULL_ASSERT */
diff --git a/GPS_DRIVERS/Core/Src/stm32l1xx_hal_msp.c b/GPS_DRIVERS/Core/Src/stm32l1xx_hal_msp.c
new file mode 100644
index 0000000..dbc214a
--- /dev/null
+++ b/GPS_DRIVERS/Core/Src/stm32l1xx_hal_msp.c
@@ -0,0 +1,256 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32l1xx_hal_msp.c
+ * @brief This file provides code for the MSP Initialization
+ * and de-Initialization codes.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN TD */
+
+/* USER CODE END TD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN Define */
+
+/* USER CODE END Define */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN Macro */
+
+/* USER CODE END Macro */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* External functions --------------------------------------------------------*/
+/* USER CODE BEGIN ExternalFunctions */
+
+/* USER CODE END ExternalFunctions */
+
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+/**
+ * Initializes the Global MSP.
+ */
+void HAL_MspInit(void)
+{
+ /* USER CODE BEGIN MspInit 0 */
+
+ /* USER CODE END MspInit 0 */
+
+ __HAL_RCC_COMP_CLK_ENABLE();
+ __HAL_RCC_SYSCFG_CLK_ENABLE();
+ __HAL_RCC_PWR_CLK_ENABLE();
+
+ /* System interrupt init*/
+
+ /* USER CODE BEGIN MspInit 1 */
+
+ /* USER CODE END MspInit 1 */
+}
+
+/**
+* @brief I2C MSP Initialization
+* This function configures the hardware resources used in this example
+* @param hi2c: I2C handle pointer
+* @retval None
+*/
+void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
+{
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ if(hi2c->Instance==I2C1)
+ {
+ /* USER CODE BEGIN I2C1_MspInit 0 */
+
+ /* USER CODE END I2C1_MspInit 0 */
+
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+ /**I2C1 GPIO Configuration
+ PB8 ------> I2C1_SCL
+ PB9 ------> I2C1_SDA
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+ GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
+ /* Peripheral clock enable */
+ __HAL_RCC_I2C1_CLK_ENABLE();
+ /* USER CODE BEGIN I2C1_MspInit 1 */
+
+ /* USER CODE END I2C1_MspInit 1 */
+ }
+
+}
+
+/**
+* @brief I2C MSP De-Initialization
+* This function freeze the hardware resources used in this example
+* @param hi2c: I2C handle pointer
+* @retval None
+*/
+void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
+{
+ if(hi2c->Instance==I2C1)
+ {
+ /* USER CODE BEGIN I2C1_MspDeInit 0 */
+
+ /* USER CODE END I2C1_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_I2C1_CLK_DISABLE();
+
+ /**I2C1 GPIO Configuration
+ PB8 ------> I2C1_SCL
+ PB9 ------> I2C1_SDA
+ */
+ HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8);
+
+ HAL_GPIO_DeInit(GPIOB, GPIO_PIN_9);
+
+ /* USER CODE BEGIN I2C1_MspDeInit 1 */
+
+ /* USER CODE END I2C1_MspDeInit 1 */
+ }
+
+}
+
+/**
+* @brief UART MSP Initialization
+* This function configures the hardware resources used in this example
+* @param huart: UART handle pointer
+* @retval None
+*/
+void HAL_UART_MspInit(UART_HandleTypeDef* huart)
+{
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ if(huart->Instance==USART1)
+ {
+ /* USER CODE BEGIN USART1_MspInit 0 */
+
+ /* USER CODE END USART1_MspInit 0 */
+ /* Peripheral clock enable */
+ __HAL_RCC_USART1_CLK_ENABLE();
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ /**USART1 GPIO Configuration
+ PA9 ------> USART1_TX
+ PA10 ------> USART1_RX
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+ GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /* USER CODE BEGIN USART1_MspInit 1 */
+
+ /* USER CODE END USART1_MspInit 1 */
+ }
+ else if(huart->Instance==USART2)
+ {
+ /* USER CODE BEGIN USART2_MspInit 0 */
+
+ /* USER CODE END USART2_MspInit 0 */
+ /* Peripheral clock enable */
+ __HAL_RCC_USART2_CLK_ENABLE();
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ /**USART2 GPIO Configuration
+ PA2 ------> USART2_TX
+ PA3 ------> USART2_RX
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3;
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+ GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+ /* USER CODE BEGIN USART2_MspInit 1 */
+
+ /* USER CODE END USART2_MspInit 1 */
+ }
+
+}
+
+/**
+* @brief UART MSP De-Initialization
+* This function freeze the hardware resources used in this example
+* @param huart: UART handle pointer
+* @retval None
+*/
+void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
+{
+ if(huart->Instance==USART1)
+ {
+ /* USER CODE BEGIN USART1_MspDeInit 0 */
+
+ /* USER CODE END USART1_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_USART1_CLK_DISABLE();
+
+ /**USART1 GPIO Configuration
+ PA9 ------> USART1_TX
+ PA10 ------> USART1_RX
+ */
+ HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
+
+ /* USER CODE BEGIN USART1_MspDeInit 1 */
+
+ /* USER CODE END USART1_MspDeInit 1 */
+ }
+ else if(huart->Instance==USART2)
+ {
+ /* USER CODE BEGIN USART2_MspDeInit 0 */
+
+ /* USER CODE END USART2_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_USART2_CLK_DISABLE();
+
+ /**USART2 GPIO Configuration
+ PA2 ------> USART2_TX
+ PA3 ------> USART2_RX
+ */
+ HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_3);
+
+ /* USER CODE BEGIN USART2_MspDeInit 1 */
+
+ /* USER CODE END USART2_MspDeInit 1 */
+ }
+
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/GPS_DRIVERS/Core/Src/stm32l1xx_it.c b/GPS_DRIVERS/Core/Src/stm32l1xx_it.c
new file mode 100644
index 0000000..a3e6ab0
--- /dev/null
+++ b/GPS_DRIVERS/Core/Src/stm32l1xx_it.c
@@ -0,0 +1,217 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32l1xx_it.c
+ * @brief Interrupt Service Routines.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+#include "stm32l1xx_it.h"
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN TD */
+
+/* USER CODE END TD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN PD */
+
+/* USER CODE END PD */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+
+/* USER CODE END PM */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* Private user code ---------------------------------------------------------*/
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/* External variables --------------------------------------------------------*/
+
+/* USER CODE BEGIN EV */
+
+/* USER CODE END EV */
+
+/******************************************************************************/
+/* Cortex-M3 Processor Interruption and Exception Handlers */
+/******************************************************************************/
+/**
+ * @brief This function handles Non maskable interrupt.
+ */
+void NMI_Handler(void)
+{
+ /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
+
+ /* USER CODE END NonMaskableInt_IRQn 0 */
+ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
+ while (1)
+ {
+ }
+ /* USER CODE END NonMaskableInt_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Hard fault interrupt.
+ */
+void HardFault_Handler(void)
+{
+ /* USER CODE BEGIN HardFault_IRQn 0 */
+
+ /* USER CODE END HardFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_HardFault_IRQn 0 */
+ /* USER CODE END W1_HardFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Memory management fault.
+ */
+void MemManage_Handler(void)
+{
+ /* USER CODE BEGIN MemoryManagement_IRQn 0 */
+
+ /* USER CODE END MemoryManagement_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
+ /* USER CODE END W1_MemoryManagement_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Pre-fetch fault, memory access fault.
+ */
+void BusFault_Handler(void)
+{
+ /* USER CODE BEGIN BusFault_IRQn 0 */
+
+ /* USER CODE END BusFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_BusFault_IRQn 0 */
+ /* USER CODE END W1_BusFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Undefined instruction or illegal state.
+ */
+void UsageFault_Handler(void)
+{
+ /* USER CODE BEGIN UsageFault_IRQn 0 */
+
+ /* USER CODE END UsageFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
+ /* USER CODE END W1_UsageFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles System service call via SWI instruction.
+ */
+void SVC_Handler(void)
+{
+ /* USER CODE BEGIN SVC_IRQn 0 */
+
+ /* USER CODE END SVC_IRQn 0 */
+ /* USER CODE BEGIN SVC_IRQn 1 */
+
+ /* USER CODE END SVC_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Debug monitor.
+ */
+void DebugMon_Handler(void)
+{
+ /* USER CODE BEGIN DebugMonitor_IRQn 0 */
+
+ /* USER CODE END DebugMonitor_IRQn 0 */
+ /* USER CODE BEGIN DebugMonitor_IRQn 1 */
+
+ /* USER CODE END DebugMonitor_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Pendable request for system service.
+ */
+void PendSV_Handler(void)
+{
+ /* USER CODE BEGIN PendSV_IRQn 0 */
+
+ /* USER CODE END PendSV_IRQn 0 */
+ /* USER CODE BEGIN PendSV_IRQn 1 */
+
+ /* USER CODE END PendSV_IRQn 1 */
+}
+
+/**
+ * @brief This function handles System tick timer.
+ */
+void SysTick_Handler(void)
+{
+ /* USER CODE BEGIN SysTick_IRQn 0 */
+
+ /* USER CODE END SysTick_IRQn 0 */
+ HAL_IncTick();
+ /* USER CODE BEGIN SysTick_IRQn 1 */
+
+ /* USER CODE END SysTick_IRQn 1 */
+}
+
+/******************************************************************************/
+/* STM32L1xx Peripheral Interrupt Handlers */
+/* Add here the Interrupt Handlers for the used peripherals. */
+/* For the available peripheral interrupt handler names, */
+/* please refer to the startup file (startup_stm32l1xx.s). */
+/******************************************************************************/
+
+/**
+ * @brief This function handles EXTI line[15:10] interrupts.
+ */
+void EXTI15_10_IRQHandler(void)
+{
+ /* USER CODE BEGIN EXTI15_10_IRQn 0 */
+
+ /* USER CODE END EXTI15_10_IRQn 0 */
+ HAL_GPIO_EXTI_IRQHandler(B1_Pin);
+ /* USER CODE BEGIN EXTI15_10_IRQn 1 */
+
+ /* USER CODE END EXTI15_10_IRQn 1 */
+}
+
+/* USER CODE BEGIN 1 */
+
+/* USER CODE END 1 */
diff --git a/GPS_DRIVERS/Core/Src/syscalls.c b/GPS_DRIVERS/Core/Src/syscalls.c
new file mode 100644
index 0000000..d190edf
--- /dev/null
+++ b/GPS_DRIVERS/Core/Src/syscalls.c
@@ -0,0 +1,176 @@
+/**
+ ******************************************************************************
+ * @file syscalls.c
+ * @author Auto-generated by STM32CubeIDE
+ * @brief STM32CubeIDE Minimal System calls file
+ *
+ * For more information about which c-functions
+ * need which of these lowlevel functions
+ * please consult the Newlib libc-manual
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2020-2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+/* Includes */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+/* Variables */
+extern int __io_putchar(int ch) __attribute__((weak));
+extern int __io_getchar(void) __attribute__((weak));
+
+
+char *__env[1] = { 0 };
+char **environ = __env;
+
+
+/* Functions */
+void initialise_monitor_handles()
+{
+}
+
+int _getpid(void)
+{
+ return 1;
+}
+
+int _kill(int pid, int sig)
+{
+ (void)pid;
+ (void)sig;
+ errno = EINVAL;
+ return -1;
+}
+
+void _exit (int status)
+{
+ _kill(status, -1);
+ while (1) {} /* Make sure we hang here */
+}
+
+__attribute__((weak)) int _read(int file, char *ptr, int len)
+{
+ (void)file;
+ int DataIdx;
+
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ {
+ *ptr++ = __io_getchar();
+ }
+
+ return len;
+}
+
+__attribute__((weak)) int _write(int file, char *ptr, int len)
+{
+ (void)file;
+ int DataIdx;
+
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ {
+ __io_putchar(*ptr++);
+ }
+ return len;
+}
+
+int _close(int file)
+{
+ (void)file;
+ return -1;
+}
+
+
+int _fstat(int file, struct stat *st)
+{
+ (void)file;
+ st->st_mode = S_IFCHR;
+ return 0;
+}
+
+int _isatty(int file)
+{
+ (void)file;
+ return 1;
+}
+
+int _lseek(int file, int ptr, int dir)
+{
+ (void)file;
+ (void)ptr;
+ (void)dir;
+ return 0;
+}
+
+int _open(char *path, int flags, ...)
+{
+ (void)path;
+ (void)flags;
+ /* Pretend like we always fail */
+ return -1;
+}
+
+int _wait(int *status)
+{
+ (void)status;
+ errno = ECHILD;
+ return -1;
+}
+
+int _unlink(char *name)
+{
+ (void)name;
+ errno = ENOENT;
+ return -1;
+}
+
+int _times(struct tms *buf)
+{
+ (void)buf;
+ return -1;
+}
+
+int _stat(char *file, struct stat *st)
+{
+ (void)file;
+ st->st_mode = S_IFCHR;
+ return 0;
+}
+
+int _link(char *old, char *new)
+{
+ (void)old;
+ (void)new;
+ errno = EMLINK;
+ return -1;
+}
+
+int _fork(void)
+{
+ errno = EAGAIN;
+ return -1;
+}
+
+int _execve(char *name, char **argv, char **env)
+{
+ (void)name;
+ (void)argv;
+ (void)env;
+ errno = ENOMEM;
+ return -1;
+}
diff --git a/GPS_DRIVERS/Core/Src/sysmem.c b/GPS_DRIVERS/Core/Src/sysmem.c
new file mode 100644
index 0000000..921ecef
--- /dev/null
+++ b/GPS_DRIVERS/Core/Src/sysmem.c
@@ -0,0 +1,79 @@
+/**
+ ******************************************************************************
+ * @file sysmem.c
+ * @author Generated by STM32CubeIDE
+ * @brief STM32CubeIDE System Memory calls file
+ *
+ * For more information about which C functions
+ * need which of these lowlevel functions
+ * please consult the newlib libc manual
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2023 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+/* Includes */
+#include
+#include
+
+/**
+ * Pointer to the current high watermark of the heap usage
+ */
+static uint8_t *__sbrk_heap_end = NULL;
+
+/**
+ * @brief _sbrk() allocates memory to the newlib heap and is used by malloc
+ * and others from the C library
+ *
+ * @verbatim
+ * ############################################################################
+ * # .data # .bss # newlib heap # MSP stack #
+ * # # # # Reserved by _Min_Stack_Size #
+ * ############################################################################
+ * ^-- RAM start ^-- _end _estack, RAM end --^
+ * @endverbatim
+ *
+ * This implementation starts allocating at the '_end' linker symbol
+ * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
+ * The implementation considers '_estack' linker symbol to be RAM end
+ * NOTE: If the MSP stack, at any point during execution, grows larger than the
+ * reserved size, please increase the '_Min_Stack_Size'.
+ *
+ * @param incr Memory size
+ * @return Pointer to allocated memory
+ */
+void *_sbrk(ptrdiff_t incr)
+{
+ extern uint8_t _end; /* Symbol defined in the linker script */
+ extern uint8_t _estack; /* Symbol defined in the linker script */
+ extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
+ const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
+ const uint8_t *max_heap = (uint8_t *)stack_limit;
+ uint8_t *prev_heap_end;
+
+ /* Initialize heap end at first call */
+ if (NULL == __sbrk_heap_end)
+ {
+ __sbrk_heap_end = &_end;
+ }
+
+ /* Protect heap from growing into the reserved MSP stack */
+ if (__sbrk_heap_end + incr > max_heap)
+ {
+ errno = ENOMEM;
+ return (void *)-1;
+ }
+
+ prev_heap_end = __sbrk_heap_end;
+ __sbrk_heap_end += incr;
+
+ return (void *)prev_heap_end;
+}
diff --git a/GPS_DRIVERS/Core/Src/system_stm32l1xx.c b/GPS_DRIVERS/Core/Src/system_stm32l1xx.c
new file mode 100644
index 0000000..b68e3de
--- /dev/null
+++ b/GPS_DRIVERS/Core/Src/system_stm32l1xx.c
@@ -0,0 +1,426 @@
+/**
+ ******************************************************************************
+ * @file system_stm32l1xx.c
+ * @author MCD Application Team
+ * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File.
+ *
+ * This file provides two functions and one global variable to be called from
+ * user application:
+ * - SystemInit(): This function is called at startup just after reset and
+ * before branch to main program. This call is made inside
+ * the "startup_stm32l1xx.s" file.
+ *
+ * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
+ * by the user application to setup the SysTick
+ * timer or configure other parameters.
+ *
+ * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
+ * be called whenever the core clock is changed
+ * during program execution.
+ *
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2017-2021 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+/** @addtogroup CMSIS
+ * @{
+ */
+
+/** @addtogroup stm32l1xx_system
+ * @{
+ */
+
+/** @addtogroup STM32L1xx_System_Private_Includes
+ * @{
+ */
+
+#include "stm32l1xx.h"
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32L1xx_System_Private_TypesDefinitions
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32L1xx_System_Private_Defines
+ * @{
+ */
+#if !defined (HSE_VALUE)
+ #define HSE_VALUE ((uint32_t)8000000U) /*!< Default value of the External oscillator in Hz.
+ This value can be provided and adapted by the user application. */
+#endif /* HSE_VALUE */
+
+#if !defined (HSI_VALUE)
+ #define HSI_VALUE ((uint32_t)16000000U) /*!< Default value of the Internal oscillator in Hz.
+ This value can be provided and adapted by the user application. */
+#endif /* HSI_VALUE */
+
+/*!< Uncomment the following line if you need to use external SRAM mounted
+ on STM32L152D_EVAL board as data memory */
+/* #define DATA_IN_ExtSRAM */
+
+/* Note: Following vector table addresses must be defined in line with linker
+ configuration. */
+/*!< Uncomment the following line if you need to relocate the vector table
+ anywhere in Flash or Sram, else the vector table is kept at the automatic
+ remap of boot address selected */
+/* #define USER_VECT_TAB_ADDRESS */
+
+#if defined(USER_VECT_TAB_ADDRESS)
+/*!< Uncomment the following line if you need to relocate your vector Table
+ in Sram else user remap will be done in Flash. */
+/* #define VECT_TAB_SRAM */
+#if defined(VECT_TAB_SRAM)
+#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+#else
+#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
+ This value must be a multiple of 0x200. */
+#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
+ This value must be a multiple of 0x200. */
+#endif /* VECT_TAB_SRAM */
+#endif /* USER_VECT_TAB_ADDRESS */
+
+/******************************************************************************/
+/**
+ * @}
+ */
+
+/** @addtogroup STM32L1xx_System_Private_Macros
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32L1xx_System_Private_Variables
+ * @{
+ */
+ /* This variable is updated in three ways:
+ 1) by calling CMSIS function SystemCoreClockUpdate()
+ 2) by calling HAL API function HAL_RCC_GetHCLKFreq()
+ 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
+ Note: If you use this function to configure the system clock; then there
+ is no need to call the 2 first functions listed above, since SystemCoreClock
+ variable is updated automatically.
+ */
+uint32_t SystemCoreClock = 2097000U;
+const uint8_t PLLMulTable[9] = {3U, 4U, 6U, 8U, 12U, 16U, 24U, 32U, 48U};
+const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U};
+const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U};
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32L1xx_System_Private_FunctionPrototypes
+ * @{
+ */
+
+#if defined (STM32L151xD) || defined (STM32L152xD) || defined (STM32L162xD)
+#ifdef DATA_IN_ExtSRAM
+ static void SystemInit_ExtMemCtl(void);
+#endif /* DATA_IN_ExtSRAM */
+#endif /* STM32L151xD || STM32L152xD || STM32L162xD */
+
+/**
+ * @}
+ */
+
+/** @addtogroup STM32L1xx_System_Private_Functions
+ * @{
+ */
+
+/**
+ * @brief Setup the microcontroller system.
+ * Initialize the Embedded Flash Interface, the PLL and update the
+ * SystemCoreClock variable.
+ * @param None
+ * @retval None
+ */
+void SystemInit (void)
+{
+#ifdef DATA_IN_ExtSRAM
+ SystemInit_ExtMemCtl();
+#endif /* DATA_IN_ExtSRAM */
+
+ /* Configure the Vector Table location -------------------------------------*/
+#if defined(USER_VECT_TAB_ADDRESS)
+ SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
+#endif /* USER_VECT_TAB_ADDRESS */
+}
+
+/**
+ * @brief Update SystemCoreClock according to Clock Register Values
+ * The SystemCoreClock variable contains the core clock (HCLK), it can
+ * be used by the user application to setup the SysTick timer or configure
+ * other parameters.
+ *
+ * @note Each time the core clock (HCLK) changes, this function must be called
+ * to update SystemCoreClock variable value. Otherwise, any configuration
+ * based on this variable will be incorrect.
+ *
+ * @note - The system frequency computed by this function is not the real
+ * frequency in the chip. It is calculated based on the predefined
+ * constant and the selected clock source:
+ *
+ * - If SYSCLK source is MSI, SystemCoreClock will contain the MSI
+ * value as defined by the MSI range.
+ *
+ * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
+ *
+ * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
+ *
+ * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
+ * or HSI_VALUE(*) multiplied/divided by the PLL factors.
+ *
+ * (*) HSI_VALUE is a constant defined in stm32l1xx.h file (default value
+ * 16 MHz) but the real value may vary depending on the variations
+ * in voltage and temperature.
+ *
+ * (**) HSE_VALUE is a constant defined in stm32l1xx.h file (default value
+ * 8 MHz), user has to ensure that HSE_VALUE is same as the real
+ * frequency of the crystal used. Otherwise, this function may
+ * have wrong result.
+ *
+ * - The result of this function could be not correct when using fractional
+ * value for HSE crystal.
+ * @param None
+ * @retval None
+ */
+void SystemCoreClockUpdate (void)
+{
+ uint32_t tmp = 0, pllmul = 0, plldiv = 0, pllsource = 0, msirange = 0;
+
+ /* Get SYSCLK source -------------------------------------------------------*/
+ tmp = RCC->CFGR & RCC_CFGR_SWS;
+
+ switch (tmp)
+ {
+ case 0x00: /* MSI used as system clock */
+ msirange = (RCC->ICSCR & RCC_ICSCR_MSIRANGE) >> 13;
+ SystemCoreClock = (32768 * (1 << (msirange + 1)));
+ break;
+ case 0x04: /* HSI used as system clock */
+ SystemCoreClock = HSI_VALUE;
+ break;
+ case 0x08: /* HSE used as system clock */
+ SystemCoreClock = HSE_VALUE;
+ break;
+ case 0x0C: /* PLL used as system clock */
+ /* Get PLL clock source and multiplication factor ----------------------*/
+ pllmul = RCC->CFGR & RCC_CFGR_PLLMUL;
+ plldiv = RCC->CFGR & RCC_CFGR_PLLDIV;
+ pllmul = PLLMulTable[(pllmul >> 18)];
+ plldiv = (plldiv >> 22) + 1;
+
+ pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
+
+ if (pllsource == 0x00)
+ {
+ /* HSI oscillator clock selected as PLL clock entry */
+ SystemCoreClock = (((HSI_VALUE) * pllmul) / plldiv);
+ }
+ else
+ {
+ /* HSE selected as PLL clock entry */
+ SystemCoreClock = (((HSE_VALUE) * pllmul) / plldiv);
+ }
+ break;
+ default: /* MSI used as system clock */
+ msirange = (RCC->ICSCR & RCC_ICSCR_MSIRANGE) >> 13;
+ SystemCoreClock = (32768 * (1 << (msirange + 1)));
+ break;
+ }
+ /* Compute HCLK clock frequency --------------------------------------------*/
+ /* Get HCLK prescaler */
+ tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
+ /* HCLK clock frequency */
+ SystemCoreClock >>= tmp;
+}
+
+#if defined (STM32L151xD) || defined (STM32L152xD) || defined (STM32L162xD)
+#ifdef DATA_IN_ExtSRAM
+/**
+ * @brief Setup the external memory controller.
+ * Called in SystemInit() function before jump to main.
+ * This function configures the external SRAM mounted on STM32L152D_EVAL board
+ * This SRAM will be used as program data memory (including heap and stack).
+ * @param None
+ * @retval None
+ */
+void SystemInit_ExtMemCtl(void)
+{
+ __IO uint32_t tmpreg = 0;
+
+ /* Flash 1 wait state */
+ FLASH->ACR |= FLASH_ACR_LATENCY;
+
+ /* Power enable */
+ RCC->APB1ENR |= RCC_APB1ENR_PWREN;
+
+ /* Delay after an RCC peripheral clock enabling */
+ tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_PWREN);
+
+ /* Select the Voltage Range 1 (1.8 V) */
+ PWR->CR = PWR_CR_VOS_0;
+
+ /* Wait Until the Voltage Regulator is ready */
+ while((PWR->CSR & PWR_CSR_VOSF) != RESET)
+ {
+ }
+
+/*-- GPIOs Configuration -----------------------------------------------------*/
+/*
+ +-------------------+--------------------+------------------+------------------+
+ + SRAM pins assignment +
+ +-------------------+--------------------+------------------+------------------+
+ | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 |
+ | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 |
+ | PD4 <-> FSMC_NOE | PE7 <-> FSMC_D4 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 |
+ | PD5 <-> FSMC_NWE | PE8 <-> FSMC_D5 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 |
+ | PD8 <-> FSMC_D13 | PE9 <-> FSMC_D6 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 |
+ | PD9 <-> FSMC_D14 | PE10 <-> FSMC_D7 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 |
+ | PD10 <-> FSMC_D15 | PE11 <-> FSMC_D8 | PF12 <-> FSMC_A6 | PG10<-> FSMC_NE2 |
+ | PD11 <-> FSMC_A16 | PE12 <-> FSMC_D9 | PF13 <-> FSMC_A7 |------------------+
+ | PD12 <-> FSMC_A17 | PE13 <-> FSMC_D10 | PF14 <-> FSMC_A8 |
+ | PD13 <-> FSMC_A18 | PE14 <-> FSMC_D11 | PF15 <-> FSMC_A9 |
+ | PD14 <-> FSMC_D0 | PE15 <-> FSMC_D12 |------------------+
+ | PD15 <-> FSMC_D1 |--------------------+
+ +-------------------+
+*/
+
+ /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */
+ RCC->AHBENR = 0x000080D8;
+
+ /* Delay after an RCC peripheral clock enabling */
+ tmpreg = READ_BIT(RCC->AHBENR, RCC_AHBENR_GPIODEN);
+
+ /* Connect PDx pins to FSMC Alternate function */
+ GPIOD->AFR[0] = 0x00CC00CC;
+ GPIOD->AFR[1] = 0xCCCCCCCC;
+ /* Configure PDx pins in Alternate function mode */
+ GPIOD->MODER = 0xAAAA0A0A;
+ /* Configure PDx pins speed to 40 MHz */
+ GPIOD->OSPEEDR = 0xFFFF0F0F;
+ /* Configure PDx pins Output type to push-pull */
+ GPIOD->OTYPER = 0x00000000;
+ /* No pull-up, pull-down for PDx pins */
+ GPIOD->PUPDR = 0x00000000;
+
+ /* Connect PEx pins to FSMC Alternate function */
+ GPIOE->AFR[0] = 0xC00000CC;
+ GPIOE->AFR[1] = 0xCCCCCCCC;
+ /* Configure PEx pins in Alternate function mode */
+ GPIOE->MODER = 0xAAAA800A;
+ /* Configure PEx pins speed to 40 MHz */
+ GPIOE->OSPEEDR = 0xFFFFC00F;
+ /* Configure PEx pins Output type to push-pull */
+ GPIOE->OTYPER = 0x00000000;
+ /* No pull-up, pull-down for PEx pins */
+ GPIOE->PUPDR = 0x00000000;
+
+ /* Connect PFx pins to FSMC Alternate function */
+ GPIOF->AFR[0] = 0x00CCCCCC;
+ GPIOF->AFR[1] = 0xCCCC0000;
+ /* Configure PFx pins in Alternate function mode */
+ GPIOF->MODER = 0xAA000AAA;
+ /* Configure PFx pins speed to 40 MHz */
+ GPIOF->OSPEEDR = 0xFF000FFF;
+ /* Configure PFx pins Output type to push-pull */
+ GPIOF->OTYPER = 0x00000000;
+ /* No pull-up, pull-down for PFx pins */
+ GPIOF->PUPDR = 0x00000000;
+
+ /* Connect PGx pins to FSMC Alternate function */
+ GPIOG->AFR[0] = 0x00CCCCCC;
+ GPIOG->AFR[1] = 0x00000C00;
+ /* Configure PGx pins in Alternate function mode */
+ GPIOG->MODER = 0x00200AAA;
+ /* Configure PGx pins speed to 40 MHz */
+ GPIOG->OSPEEDR = 0x00300FFF;
+ /* Configure PGx pins Output type to push-pull */
+ GPIOG->OTYPER = 0x00000000;
+ /* No pull-up, pull-down for PGx pins */
+ GPIOG->PUPDR = 0x00000000;
+
+/*-- FSMC Configuration ------------------------------------------------------*/
+ /* Enable the FSMC interface clock */
+ RCC->AHBENR = 0x400080D8;
+
+ /* Delay after an RCC peripheral clock enabling */
+ tmpreg = READ_BIT(RCC->AHBENR, RCC_AHBENR_FSMCEN);
+
+ (void)(tmpreg);
+
+ /* Configure and enable Bank1_SRAM3 */
+ FSMC_Bank1->BTCR[4] = 0x00001011;
+ FSMC_Bank1->BTCR[5] = 0x00000300;
+ FSMC_Bank1E->BWTR[4] = 0x0FFFFFFF;
+/*
+ Bank1_SRAM3 is configured as follow:
+
+ p.FSMC_AddressSetupTime = 0;
+ p.FSMC_AddressHoldTime = 0;
+ p.FSMC_DataSetupTime = 3;
+ p.FSMC_BusTurnAroundDuration = 0;
+ p.FSMC_CLKDivision = 0;
+ p.FSMC_DataLatency = 0;
+ p.FSMC_AccessMode = FSMC_AccessMode_A;
+
+ FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM3;
+ FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable;
+ FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM;
+ FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;
+ FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable;
+ FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable;
+ FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
+ FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;
+ FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;
+ FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;
+ FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
+ FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;
+ FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
+ FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p;
+ FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p;
+
+ FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);
+
+ FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM3, ENABLE);
+*/
+
+}
+#endif /* DATA_IN_ExtSRAM */
+#endif /* STM32L151xD || STM32L152xD || STM32L162xD */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+
diff --git a/GPS_DRIVERS/Core/Startup/startup_stm32l152retx.s b/GPS_DRIVERS/Core/Startup/startup_stm32l152retx.s
new file mode 100644
index 0000000..d3dd841
--- /dev/null
+++ b/GPS_DRIVERS/Core/Startup/startup_stm32l152retx.s
@@ -0,0 +1,413 @@
+/**
+ ******************************************************************************
+ * @file startup_stm32l152xe.s
+ * @author MCD Application Team
+ * @brief STM32L152XE Devices vector table for GCC toolchain.
+ * This module performs:
+ * - Set the initial SP
+ * - Set the initial PC == Reset_Handler,
+ * - Set the vector table entries with the exceptions ISR address
+ * - Configure the clock system
+ * - Branches to main in the C library (which eventually
+ * calls main()).
+ * After Reset the Cortex-M3 processor is in Thread mode,
+ * priority is Privileged, and the Stack is set to Main.
+ ******************************************************************************
+ * @attention
+ *
+ * Copyright (c) 2017-2021 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software is licensed under terms that can be found in the LICENSE file
+ * in the root directory of this software component.
+ * If no LICENSE file comes with this software, it is provided AS-IS.
+ *
+ ******************************************************************************
+ */
+
+ .syntax unified
+ .cpu cortex-m3
+ .fpu softvfp
+ .thumb
+
+.global g_pfnVectors
+.global Default_Handler
+
+/* start address for the initialization values of the .data section.
+defined in linker script */
+.word _sidata
+/* start address for the .data section. defined in linker script */
+.word _sdata
+/* end address for the .data section. defined in linker script */
+.word _edata
+/* start address for the .bss section. defined in linker script */
+.word _sbss
+/* end address for the .bss section. defined in linker script */
+.word _ebss
+
+.equ BootRAM, 0xF108F85F
+/**
+ * @brief This is the code that gets called when the processor first
+ * starts execution following a reset event. Only the absolutely
+ * necessary set is performed, after which the application
+ * supplied main() routine is called.
+ * @param None
+ * @retval : None
+*/
+
+ .section .text.Reset_Handler
+ .weak Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+
+
+/* Call the clock system initialization function.*/
+ bl SystemInit
+
+/* Copy the data segment initializers from flash to SRAM */
+ ldr r0, =_sdata
+ ldr r1, =_edata
+ ldr r2, =_sidata
+ movs r3, #0
+ b LoopCopyDataInit
+
+CopyDataInit:
+ ldr r4, [r2, r3]
+ str r4, [r0, r3]
+ adds r3, r3, #4
+
+LoopCopyDataInit:
+ adds r4, r0, r3
+ cmp r4, r1
+ bcc CopyDataInit
+
+/* Zero fill the bss segment. */
+ ldr r2, =_sbss
+ ldr r4, =_ebss
+ movs r3, #0
+ b LoopFillZerobss
+
+FillZerobss:
+ str r3, [r2]
+ adds r2, r2, #4
+
+LoopFillZerobss:
+ cmp r2, r4
+ bcc FillZerobss
+
+/* Call static constructors */
+ bl __libc_init_array
+/* Call the application's entry point.*/
+ bl main
+ bx lr
+.size Reset_Handler, .-Reset_Handler
+
+/**
+ * @brief This is the code that gets called when the processor receives an
+ * unexpected interrupt. This simply enters an infinite loop, preserving
+ * the system state for examination by a debugger.
+ *
+ * @param None
+ * @retval : None
+*/
+ .section .text.Default_Handler,"ax",%progbits
+Default_Handler:
+Infinite_Loop:
+ b Infinite_Loop
+ .size Default_Handler, .-Default_Handler
+/******************************************************************************
+*
+* The minimal vector table for a Cortex M3. Note that the proper constructs
+* must be placed on this to ensure that it ends up at physical address
+* 0x0000.0000.
+*
+******************************************************************************/
+ .section .isr_vector,"a",%progbits
+ .type g_pfnVectors, %object
+ .size g_pfnVectors, .-g_pfnVectors
+
+
+g_pfnVectors:
+ .word _estack
+ .word Reset_Handler
+ .word NMI_Handler
+ .word HardFault_Handler
+ .word MemManage_Handler
+ .word BusFault_Handler
+ .word UsageFault_Handler
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word SVC_Handler
+ .word DebugMon_Handler
+ .word 0
+ .word PendSV_Handler
+ .word SysTick_Handler
+ .word WWDG_IRQHandler
+ .word PVD_IRQHandler
+ .word TAMPER_STAMP_IRQHandler
+ .word RTC_WKUP_IRQHandler
+ .word FLASH_IRQHandler
+ .word RCC_IRQHandler
+ .word EXTI0_IRQHandler
+ .word EXTI1_IRQHandler
+ .word EXTI2_IRQHandler
+ .word EXTI3_IRQHandler
+ .word EXTI4_IRQHandler
+ .word DMA1_Channel1_IRQHandler
+ .word DMA1_Channel2_IRQHandler
+ .word DMA1_Channel3_IRQHandler
+ .word DMA1_Channel4_IRQHandler
+ .word DMA1_Channel5_IRQHandler
+ .word DMA1_Channel6_IRQHandler
+ .word DMA1_Channel7_IRQHandler
+ .word ADC1_IRQHandler
+ .word USB_HP_IRQHandler
+ .word USB_LP_IRQHandler
+ .word DAC_IRQHandler
+ .word COMP_IRQHandler
+ .word EXTI9_5_IRQHandler
+ .word LCD_IRQHandler
+ .word TIM9_IRQHandler
+ .word TIM10_IRQHandler
+ .word TIM11_IRQHandler
+ .word TIM2_IRQHandler
+ .word TIM3_IRQHandler
+ .word TIM4_IRQHandler
+ .word I2C1_EV_IRQHandler
+ .word I2C1_ER_IRQHandler
+ .word I2C2_EV_IRQHandler
+ .word I2C2_ER_IRQHandler
+ .word SPI1_IRQHandler
+ .word SPI2_IRQHandler
+ .word USART1_IRQHandler
+ .word USART2_IRQHandler
+ .word USART3_IRQHandler
+ .word EXTI15_10_IRQHandler
+ .word RTC_Alarm_IRQHandler
+ .word USB_FS_WKUP_IRQHandler
+ .word TIM6_IRQHandler
+ .word TIM7_IRQHandler
+ .word 0
+ .word TIM5_IRQHandler
+ .word SPI3_IRQHandler
+ .word UART4_IRQHandler
+ .word UART5_IRQHandler
+ .word DMA2_Channel1_IRQHandler
+ .word DMA2_Channel2_IRQHandler
+ .word DMA2_Channel3_IRQHandler
+ .word DMA2_Channel4_IRQHandler
+ .word DMA2_Channel5_IRQHandler
+ .word 0
+ .word COMP_ACQ_IRQHandler
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word BootRAM /* @0x108. This is for boot in RAM mode for
+ STM32L152XE devices. */
+
+/*******************************************************************************
+*
+* Provide weak aliases for each Exception handler to the Default_Handler.
+* As they are weak aliases, any function with the same name will override
+* this definition.
+*
+*******************************************************************************/
+
+ .weak NMI_Handler
+ .thumb_set NMI_Handler,Default_Handler
+
+ .weak HardFault_Handler
+ .thumb_set HardFault_Handler,Default_Handler
+
+ .weak MemManage_Handler
+ .thumb_set MemManage_Handler,Default_Handler
+
+ .weak BusFault_Handler
+ .thumb_set BusFault_Handler,Default_Handler
+
+ .weak UsageFault_Handler
+ .thumb_set UsageFault_Handler,Default_Handler
+
+ .weak SVC_Handler
+ .thumb_set SVC_Handler,Default_Handler
+
+ .weak DebugMon_Handler
+ .thumb_set DebugMon_Handler,Default_Handler
+
+ .weak PendSV_Handler
+ .thumb_set PendSV_Handler,Default_Handler
+
+ .weak SysTick_Handler
+ .thumb_set SysTick_Handler,Default_Handler
+
+ .weak WWDG_IRQHandler
+ .thumb_set WWDG_IRQHandler,Default_Handler
+
+ .weak PVD_IRQHandler
+ .thumb_set PVD_IRQHandler,Default_Handler
+
+ .weak TAMPER_STAMP_IRQHandler
+ .thumb_set TAMPER_STAMP_IRQHandler,Default_Handler
+
+ .weak RTC_WKUP_IRQHandler
+ .thumb_set RTC_WKUP_IRQHandler,Default_Handler
+
+ .weak FLASH_IRQHandler
+ .thumb_set FLASH_IRQHandler,Default_Handler
+
+ .weak RCC_IRQHandler
+ .thumb_set RCC_IRQHandler,Default_Handler
+
+ .weak EXTI0_IRQHandler
+ .thumb_set EXTI0_IRQHandler,Default_Handler
+
+ .weak EXTI1_IRQHandler
+ .thumb_set EXTI1_IRQHandler,Default_Handler
+
+ .weak EXTI2_IRQHandler
+ .thumb_set EXTI2_IRQHandler,Default_Handler
+
+ .weak EXTI3_IRQHandler
+ .thumb_set EXTI3_IRQHandler,Default_Handler
+
+ .weak EXTI4_IRQHandler
+ .thumb_set EXTI4_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel1_IRQHandler
+ .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel2_IRQHandler
+ .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel3_IRQHandler
+ .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel4_IRQHandler
+ .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel5_IRQHandler
+ .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel6_IRQHandler
+ .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
+
+ .weak DMA1_Channel7_IRQHandler
+ .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
+
+ .weak ADC1_IRQHandler
+ .thumb_set ADC1_IRQHandler,Default_Handler
+
+ .weak USB_HP_IRQHandler
+ .thumb_set USB_HP_IRQHandler,Default_Handler
+
+ .weak USB_LP_IRQHandler
+ .thumb_set USB_LP_IRQHandler,Default_Handler
+
+ .weak DAC_IRQHandler
+ .thumb_set DAC_IRQHandler,Default_Handler
+
+ .weak COMP_IRQHandler
+ .thumb_set COMP_IRQHandler,Default_Handler
+
+ .weak EXTI9_5_IRQHandler
+ .thumb_set EXTI9_5_IRQHandler,Default_Handler
+
+ .weak LCD_IRQHandler
+ .thumb_set LCD_IRQHandler,Default_Handler
+
+ .weak TIM9_IRQHandler
+ .thumb_set TIM9_IRQHandler,Default_Handler
+
+ .weak TIM10_IRQHandler
+ .thumb_set TIM10_IRQHandler,Default_Handler
+
+ .weak TIM11_IRQHandler
+ .thumb_set TIM11_IRQHandler,Default_Handler
+
+ .weak TIM2_IRQHandler
+ .thumb_set TIM2_IRQHandler,Default_Handler
+
+ .weak TIM3_IRQHandler
+ .thumb_set TIM3_IRQHandler,Default_Handler
+
+ .weak TIM4_IRQHandler
+ .thumb_set TIM4_IRQHandler,Default_Handler
+
+ .weak I2C1_EV_IRQHandler
+ .thumb_set I2C1_EV_IRQHandler,Default_Handler
+
+ .weak I2C1_ER_IRQHandler
+ .thumb_set I2C1_ER_IRQHandler,Default_Handler
+
+ .weak I2C2_EV_IRQHandler
+ .thumb_set I2C2_EV_IRQHandler,Default_Handler
+
+ .weak I2C2_ER_IRQHandler
+ .thumb_set I2C2_ER_IRQHandler,Default_Handler
+
+ .weak SPI1_IRQHandler
+ .thumb_set SPI1_IRQHandler,Default_Handler
+
+ .weak SPI2_IRQHandler
+ .thumb_set SPI2_IRQHandler,Default_Handler
+
+ .weak USART1_IRQHandler
+ .thumb_set USART1_IRQHandler,Default_Handler
+
+ .weak USART2_IRQHandler
+ .thumb_set USART2_IRQHandler,Default_Handler
+
+ .weak USART3_IRQHandler
+ .thumb_set USART3_IRQHandler,Default_Handler
+
+ .weak EXTI15_10_IRQHandler
+ .thumb_set EXTI15_10_IRQHandler,Default_Handler
+
+ .weak RTC_Alarm_IRQHandler
+ .thumb_set RTC_Alarm_IRQHandler,Default_Handler
+
+ .weak USB_FS_WKUP_IRQHandler
+ .thumb_set USB_FS_WKUP_IRQHandler,Default_Handler
+
+ .weak TIM6_IRQHandler
+ .thumb_set TIM6_IRQHandler,Default_Handler
+
+ .weak TIM7_IRQHandler
+ .thumb_set TIM7_IRQHandler,Default_Handler
+
+ .weak TIM5_IRQHandler
+ .thumb_set TIM5_IRQHandler,Default_Handler
+
+ .weak SPI3_IRQHandler
+ .thumb_set SPI3_IRQHandler,Default_Handler
+
+ .weak UART4_IRQHandler
+ .thumb_set UART4_IRQHandler,Default_Handler
+
+ .weak UART5_IRQHandler
+ .thumb_set UART5_IRQHandler,Default_Handler
+
+ .weak DMA2_Channel1_IRQHandler
+ .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
+
+ .weak DMA2_Channel2_IRQHandler
+ .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
+
+ .weak DMA2_Channel3_IRQHandler
+ .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
+
+ .weak DMA2_Channel4_IRQHandler
+ .thumb_set DMA2_Channel4_IRQHandler,Default_Handler
+
+ .weak DMA2_Channel5_IRQHandler
+ .thumb_set DMA2_Channel5_IRQHandler,Default_Handler
+
+ .weak COMP_ACQ_IRQHandler
+ .thumb_set COMP_ACQ_IRQHandler,Default_Handler
+
+
+
diff --git a/GPS_DRIVERS/Debug/Core/Src/M8N.cyclo b/GPS_DRIVERS/Debug/Core/Src/M8N.cyclo
new file mode 100644
index 0000000..5abef7b
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/M8N.cyclo
@@ -0,0 +1,5 @@
+M8N.c:92:10:UBX_M8N_CHECKSUM 2
+M8N.c:117:6:UBX_M8N_NAV_POSLLH_Parsing 1
+M8N.c:131:6:CONFIG_Transmit 5
+M8N.c:163:10:UBX_GET_LENGTH 2
+M8N.c:177:6:GPS_Initialization 2
diff --git a/GPS_DRIVERS/Debug/Core/Src/main.cyclo b/GPS_DRIVERS/Debug/Core/Src/main.cyclo
new file mode 100644
index 0000000..fbf48fd
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/main.cyclo
@@ -0,0 +1,9 @@
+main.c:68:1:__io_putchar 1
+main.c:84:5:main 5
+main.c:179:6:SystemClock_Config 3
+main.c:221:13:MX_I2C1_Init 2
+main.c:255:13:MX_USART1_UART_Init 2
+main.c:288:13:MX_USART2_UART_Init 2
+main.c:321:13:MX_GPIO_Init 1
+main.c:347:6:HAL_GPIO_EXTI_Callback 2
+main.c:361:6:Error_Handler 1
diff --git a/GPS_DRIVERS/Debug/Core/Src/stm32l1xx_hal_msp.cyclo b/GPS_DRIVERS/Debug/Core/Src/stm32l1xx_hal_msp.cyclo
new file mode 100644
index 0000000..a43ecb9
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/stm32l1xx_hal_msp.cyclo
@@ -0,0 +1,5 @@
+stm32l1xx_hal_msp.c:63:6:HAL_MspInit 1
+stm32l1xx_hal_msp.c:86:6:HAL_I2C_MspInit 2
+stm32l1xx_hal_msp.c:122:6:HAL_I2C_MspDeInit 2
+stm32l1xx_hal_msp.c:153:6:HAL_UART_MspInit 3
+stm32l1xx_hal_msp.c:213:6:HAL_UART_MspDeInit 3
diff --git a/GPS_DRIVERS/Debug/Core/Src/stm32l1xx_it.cyclo b/GPS_DRIVERS/Debug/Core/Src/stm32l1xx_it.cyclo
new file mode 100644
index 0000000..5c4b783
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/stm32l1xx_it.cyclo
@@ -0,0 +1,10 @@
+stm32l1xx_it.c:69:6:NMI_Handler 1
+stm32l1xx_it.c:84:6:HardFault_Handler 1
+stm32l1xx_it.c:99:6:MemManage_Handler 1
+stm32l1xx_it.c:114:6:BusFault_Handler 1
+stm32l1xx_it.c:129:6:UsageFault_Handler 1
+stm32l1xx_it.c:144:6:SVC_Handler 1
+stm32l1xx_it.c:157:6:DebugMon_Handler 1
+stm32l1xx_it.c:170:6:PendSV_Handler 1
+stm32l1xx_it.c:183:6:SysTick_Handler 1
+stm32l1xx_it.c:204:6:EXTI15_10_IRQHandler 1
diff --git a/GPS_DRIVERS/Debug/Core/Src/subdir.mk b/GPS_DRIVERS/Debug/Core/Src/subdir.mk
new file mode 100644
index 0000000..85a98cc
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/subdir.mk
@@ -0,0 +1,45 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../Core/Src/M8N.c \
+../Core/Src/main.c \
+../Core/Src/stm32l1xx_hal_msp.c \
+../Core/Src/stm32l1xx_it.c \
+../Core/Src/syscalls.c \
+../Core/Src/sysmem.c \
+../Core/Src/system_stm32l1xx.c
+
+OBJS += \
+./Core/Src/M8N.o \
+./Core/Src/main.o \
+./Core/Src/stm32l1xx_hal_msp.o \
+./Core/Src/stm32l1xx_it.o \
+./Core/Src/syscalls.o \
+./Core/Src/sysmem.o \
+./Core/Src/system_stm32l1xx.o
+
+C_DEPS += \
+./Core/Src/M8N.d \
+./Core/Src/main.d \
+./Core/Src/stm32l1xx_hal_msp.d \
+./Core/Src/stm32l1xx_it.d \
+./Core/Src/syscalls.d \
+./Core/Src/sysmem.d \
+./Core/Src/system_stm32l1xx.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk
+ arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32L152xE -c -I../Core/Inc -I../Drivers/STM32L1xx_HAL_Driver/Inc -I../Drivers/STM32L1xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32L1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
+
+clean: clean-Core-2f-Src
+
+clean-Core-2f-Src:
+ -$(RM) ./Core/Src/M8N.cyclo ./Core/Src/M8N.d ./Core/Src/M8N.o ./Core/Src/M8N.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32l1xx_hal_msp.cyclo ./Core/Src/stm32l1xx_hal_msp.d ./Core/Src/stm32l1xx_hal_msp.o ./Core/Src/stm32l1xx_hal_msp.su ./Core/Src/stm32l1xx_it.cyclo ./Core/Src/stm32l1xx_it.d ./Core/Src/stm32l1xx_it.o ./Core/Src/stm32l1xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32l1xx.cyclo ./Core/Src/system_stm32l1xx.d ./Core/Src/system_stm32l1xx.o ./Core/Src/system_stm32l1xx.su
+
+.PHONY: clean-Core-2f-Src
+
diff --git a/GPS_DRIVERS/Debug/Core/Src/syscalls.cyclo b/GPS_DRIVERS/Debug/Core/Src/syscalls.cyclo
new file mode 100644
index 0000000..7283e9f
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/syscalls.cyclo
@@ -0,0 +1,18 @@
+syscalls.c:44:6:initialise_monitor_handles 1
+syscalls.c:48:5:_getpid 1
+syscalls.c:53:5:_kill 1
+syscalls.c:61:6:_exit 1
+syscalls.c:67:27:_read 2
+syscalls.c:80:27:_write 2
+syscalls.c:92:5:_close 1
+syscalls.c:99:5:_fstat 1
+syscalls.c:106:5:_isatty 1
+syscalls.c:112:5:_lseek 1
+syscalls.c:120:5:_open 1
+syscalls.c:128:5:_wait 1
+syscalls.c:135:5:_unlink 1
+syscalls.c:142:5:_times 1
+syscalls.c:148:5:_stat 1
+syscalls.c:155:5:_link 1
+syscalls.c:163:5:_fork 1
+syscalls.c:169:5:_execve 1
diff --git a/GPS_DRIVERS/Debug/Core/Src/sysmem.cyclo b/GPS_DRIVERS/Debug/Core/Src/sysmem.cyclo
new file mode 100644
index 0000000..611be9f
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/sysmem.cyclo
@@ -0,0 +1 @@
+sysmem.c:53:7:_sbrk 3
diff --git a/GPS_DRIVERS/Debug/Core/Src/system_stm32l1xx.cyclo b/GPS_DRIVERS/Debug/Core/Src/system_stm32l1xx.cyclo
new file mode 100644
index 0000000..7a33f31
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Src/system_stm32l1xx.cyclo
@@ -0,0 +1,2 @@
+system_stm32l1xx.c:159:6:SystemInit 1
+system_stm32l1xx.c:209:6:SystemCoreClockUpdate 6
diff --git a/GPS_DRIVERS/Debug/Core/Startup/subdir.mk b/GPS_DRIVERS/Debug/Core/Startup/subdir.mk
new file mode 100644
index 0000000..5ce2c54
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Core/Startup/subdir.mk
@@ -0,0 +1,27 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+S_SRCS += \
+../Core/Startup/startup_stm32l152retx.s
+
+OBJS += \
+./Core/Startup/startup_stm32l152retx.o
+
+S_DEPS += \
+./Core/Startup/startup_stm32l152retx.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+Core/Startup/%.o: ../Core/Startup/%.s Core/Startup/subdir.mk
+ arm-none-eabi-gcc -mcpu=cortex-m3 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" "$<"
+
+clean: clean-Core-2f-Startup
+
+clean-Core-2f-Startup:
+ -$(RM) ./Core/Startup/startup_stm32l152retx.d ./Core/Startup/startup_stm32l152retx.o
+
+.PHONY: clean-Core-2f-Startup
+
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.cyclo
new file mode 100644
index 0000000..99bcde4
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.cyclo
@@ -0,0 +1,25 @@
+stm32l1xx_hal.c:140:19:HAL_Init 2
+stm32l1xx_hal.c:173:19:HAL_DeInit 1
+stm32l1xx_hal.c:196:13:HAL_MspInit 1
+stm32l1xx_hal.c:207:13:HAL_MspDeInit 1
+stm32l1xx_hal.c:230:26:HAL_InitTick 4
+stm32l1xx_hal.c:298:13:HAL_IncTick 1
+stm32l1xx_hal.c:309:17:HAL_GetTick 1
+stm32l1xx_hal.c:318:10:HAL_GetTickPrio 1
+stm32l1xx_hal.c:328:19:HAL_SetTickFreq 3
+stm32l1xx_hal.c:361:10:HAL_GetTickFreq 1
+stm32l1xx_hal.c:377:13:HAL_Delay 3
+stm32l1xx_hal.c:403:13:HAL_SuspendTick 1
+stm32l1xx_hal.c:419:13:HAL_ResumeTick 1
+stm32l1xx_hal.c:429:10:HAL_GetHalVersion 1
+stm32l1xx_hal.c:438:10:HAL_GetREVID 1
+stm32l1xx_hal.c:447:10:HAL_GetDEVID 1
+stm32l1xx_hal.c:456:10:HAL_GetUIDw0 1
+stm32l1xx_hal.c:465:10:HAL_GetUIDw1 1
+stm32l1xx_hal.c:474:10:HAL_GetUIDw2 1
+stm32l1xx_hal.c:503:6:HAL_DBGMCU_EnableDBGSleepMode 1
+stm32l1xx_hal.c:512:6:HAL_DBGMCU_DisableDBGSleepMode 1
+stm32l1xx_hal.c:521:6:HAL_DBGMCU_EnableDBGStopMode 1
+stm32l1xx_hal.c:530:6:HAL_DBGMCU_DisableDBGStopMode 1
+stm32l1xx_hal.c:539:6:HAL_DBGMCU_EnableDBGStandbyMode 1
+stm32l1xx_hal.c:548:6:HAL_DBGMCU_DisableDBGStandbyMode 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.cyclo
new file mode 100644
index 0000000..49d23bf
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.cyclo
@@ -0,0 +1,32 @@
+core_cm3.h:1480:22:__NVIC_SetPriorityGrouping 1
+core_cm3.h:1499:26:__NVIC_GetPriorityGrouping 1
+core_cm3.h:1511:22:__NVIC_EnableIRQ 2
+core_cm3.h:1547:22:__NVIC_DisableIRQ 2
+core_cm3.h:1566:26:__NVIC_GetPendingIRQ 2
+core_cm3.h:1585:22:__NVIC_SetPendingIRQ 2
+core_cm3.h:1600:22:__NVIC_ClearPendingIRQ 2
+core_cm3.h:1617:26:__NVIC_GetActive 2
+core_cm3.h:1639:22:__NVIC_SetPriority 2
+core_cm3.h:1661:26:__NVIC_GetPriority 2
+core_cm3.h:1686:26:NVIC_EncodePriority 2
+core_cm3.h:1713:22:NVIC_DecodePriority 2
+core_cm3.h:1762:34:__NVIC_SystemReset 1
+core_cm3.h:1834:26:SysTick_Config 2
+stm32l1xx_hal_cortex.c:168:6:HAL_NVIC_SetPriorityGrouping 1
+stm32l1xx_hal_cortex.c:190:6:HAL_NVIC_SetPriority 1
+stm32l1xx_hal_cortex.c:212:6:HAL_NVIC_EnableIRQ 1
+stm32l1xx_hal_cortex.c:228:6:HAL_NVIC_DisableIRQ 1
+stm32l1xx_hal_cortex.c:241:6:HAL_NVIC_SystemReset 0
+stm32l1xx_hal_cortex.c:254:10:HAL_SYSTICK_Config 1
+stm32l1xx_hal_cortex.c:290:6:HAL_MPU_Enable 1
+stm32l1xx_hal_cortex.c:304:6:HAL_MPU_Disable 1
+stm32l1xx_hal_cortex.c:319:6:HAL_MPU_ConfigRegion 2
+stm32l1xx_hal_cortex.c:363:10:HAL_NVIC_GetPriorityGrouping 1
+stm32l1xx_hal_cortex.c:390:6:HAL_NVIC_GetPriority 1
+stm32l1xx_hal_cortex.c:405:6:HAL_NVIC_SetPendingIRQ 1
+stm32l1xx_hal_cortex.c:420:10:HAL_NVIC_GetPendingIRQ 1
+stm32l1xx_hal_cortex.c:433:6:HAL_NVIC_ClearPendingIRQ 1
+stm32l1xx_hal_cortex.c:447:10:HAL_NVIC_GetActive 1
+stm32l1xx_hal_cortex.c:461:6:HAL_SYSTICK_CLKSourceConfig 2
+stm32l1xx_hal_cortex.c:479:6:HAL_SYSTICK_IRQHandler 1
+stm32l1xx_hal_cortex.c:488:13:HAL_SYSTICK_Callback 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.cyclo
new file mode 100644
index 0000000..6780224
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.cyclo
@@ -0,0 +1,13 @@
+stm32l1xx_hal_dma.c:144:19:HAL_DMA_Init 3
+stm32l1xx_hal_dma.c:223:19:HAL_DMA_DeInit 3
+stm32l1xx_hal_dma.c:315:19:HAL_DMA_Start 3
+stm32l1xx_hal_dma.c:358:19:HAL_DMA_Start_IT 4
+stm32l1xx_hal_dma.c:413:19:HAL_DMA_Abort 2
+stm32l1xx_hal_dma.c:454:19:HAL_DMA_Abort_IT 3
+stm32l1xx_hal_dma.c:499:19:HAL_DMA_PollForTransfer 10
+stm32l1xx_hal_dma.c:600:6:HAL_DMA_IRQHandler 12
+stm32l1xx_hal_dma.c:697:19:HAL_DMA_RegisterCallback 7
+stm32l1xx_hal_dma.c:748:19:HAL_DMA_UnRegisterCallback 8
+stm32l1xx_hal_dma.c:826:22:HAL_DMA_GetState 1
+stm32l1xx_hal_dma.c:838:10:HAL_DMA_GetError 1
+stm32l1xx_hal_dma.c:864:13:DMA_SetConfig 2
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.cyclo
new file mode 100644
index 0000000..779cbb0
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.cyclo
@@ -0,0 +1,9 @@
+stm32l1xx_hal_exti.c:142:19:HAL_EXTI_SetConfigLine 9
+stm32l1xx_hal_exti.c:237:19:HAL_EXTI_GetConfigLine 9
+stm32l1xx_hal_exti.c:316:19:HAL_EXTI_ClearConfigLine 4
+stm32l1xx_hal_exti.c:369:19:HAL_EXTI_RegisterCallback 2
+stm32l1xx_hal_exti.c:394:19:HAL_EXTI_GetHandle 2
+stm32l1xx_hal_exti.c:434:6:HAL_EXTI_IRQHandler 3
+stm32l1xx_hal_exti.c:466:10:HAL_EXTI_GetPending 1
+stm32l1xx_hal_exti.c:495:6:HAL_EXTI_ClearPending 1
+stm32l1xx_hal_exti.c:516:6:HAL_EXTI_GenerateSWI 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.cyclo
new file mode 100644
index 0000000..adea52f
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.cyclo
@@ -0,0 +1,13 @@
+stm32l1xx_hal_flash.c:229:19:HAL_FLASH_Program 3
+stm32l1xx_hal_flash.c:271:19:HAL_FLASH_Program_IT 3
+stm32l1xx_hal_flash.c:302:6:HAL_FLASH_IRQHandler 12
+stm32l1xx_hal_flash.c:417:13:HAL_FLASH_EndOfOperationCallback 1
+stm32l1xx_hal_flash.c:434:13:HAL_FLASH_OperationErrorCallback 1
+stm32l1xx_hal_flash.c:467:19:HAL_FLASH_Unlock 5
+stm32l1xx_hal_flash.c:502:19:HAL_FLASH_Lock 1
+stm32l1xx_hal_flash.c:514:19:HAL_FLASH_OB_Unlock 5
+stm32l1xx_hal_flash.c:550:19:HAL_FLASH_OB_Lock 1
+stm32l1xx_hal_flash.c:563:19:HAL_FLASH_OB_Launch 1
+stm32l1xx_hal_flash.c:595:10:HAL_FLASH_GetError 1
+stm32l1xx_hal_flash.c:617:19:FLASH_WaitForLastOperation 11
+stm32l1xx_hal_flash.c:668:13:FLASH_SetErrorCode 6
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.cyclo
new file mode 100644
index 0000000..1a1dfda
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.cyclo
@@ -0,0 +1,31 @@
+stm32l1xx_hal_flash_ex.c:185:19:HAL_FLASHEx_Erase 5
+stm32l1xx_hal_flash_ex.c:281:19:HAL_FLASHEx_Erase_IT 4
+stm32l1xx_hal_flash_ex.c:404:19:HAL_FLASHEx_OBProgram 11
+stm32l1xx_hal_flash_ex.c:486:6:HAL_FLASHEx_OBGetConfig 1
+stm32l1xx_hal_flash_ex.c:540:19:HAL_FLASHEx_AdvOBProgram 2
+stm32l1xx_hal_flash_ex.c:597:6:HAL_FLASHEx_AdvOBGetConfig 1
+stm32l1xx_hal_flash_ex.c:749:19:HAL_FLASHEx_DATAEEPROM_Unlock 2
+stm32l1xx_hal_flash_ex.c:768:19:HAL_FLASHEx_DATAEEPROM_Lock 1
+stm32l1xx_hal_flash_ex.c:788:19:HAL_FLASHEx_DATAEEPROM_Erase 5
+stm32l1xx_hal_flash_ex.c:846:21:HAL_FLASHEx_DATAEEPROM_Program 9
+stm32l1xx_hal_flash_ex.c:911:6:HAL_FLASHEx_DATAEEPROM_EnableFixedTimeProgram 1
+stm32l1xx_hal_flash_ex.c:920:6:HAL_FLASHEx_DATAEEPROM_DisableFixedTimeProgram 1
+stm32l1xx_hal_flash_ex.c:956:26:FLASH_OB_RDPConfig 4
+stm32l1xx_hal_flash_ex.c:1020:26:FLASH_OB_BORConfig 2
+stm32l1xx_hal_flash_ex.c:1058:16:FLASH_OB_GetUser 1
+stm32l1xx_hal_flash_ex.c:1072:16:FLASH_OB_GetRDP 3
+stm32l1xx_hal_flash_ex.c:1090:16:FLASH_OB_GetBOR 1
+stm32l1xx_hal_flash_ex.c:1104:26:FLASH_OB_WRPConfig 6
+stm32l1xx_hal_flash_ex.c:1235:13:FLASH_OB_WRPConfigWRP1OrPCROP1 2
+stm32l1xx_hal_flash_ex.c:1281:13:FLASH_OB_WRPConfigWRP2OrPCROP2 2
+stm32l1xx_hal_flash_ex.c:1327:13:FLASH_OB_WRPConfigWRP3 2
+stm32l1xx_hal_flash_ex.c:1372:13:FLASH_OB_WRPConfigWRP4 2
+stm32l1xx_hal_flash_ex.c:1422:26:FLASH_OB_UserConfig 2
+stm32l1xx_hal_flash_ex.c:1475:26:FLASH_OB_BootConfig 2
+stm32l1xx_hal_flash_ex.c:1524:26:FLASH_DATAEEPROM_FastProgramByte 2
+stm32l1xx_hal_flash_ex.c:1584:26:FLASH_DATAEEPROM_FastProgramHalfWord 2
+stm32l1xx_hal_flash_ex.c:1652:26:FLASH_DATAEEPROM_FastProgramWord 2
+stm32l1xx_hal_flash_ex.c:1683:26:FLASH_DATAEEPROM_ProgramByte 2
+stm32l1xx_hal_flash_ex.c:1737:26:FLASH_DATAEEPROM_ProgramHalfWord 2
+stm32l1xx_hal_flash_ex.c:1798:26:FLASH_DATAEEPROM_ProgramWord 2
+stm32l1xx_hal_flash_ex.c:1843:6:FLASH_PageErase 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.cyclo
new file mode 100644
index 0000000..fed2407
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.cyclo
@@ -0,0 +1,10 @@
+stm32l1xx_hal_flash_ramfunc.c:113:30:HAL_FLASHEx_EnableRunPowerDown 1
+stm32l1xx_hal_flash_ramfunc.c:126:30:HAL_FLASHEx_DisableRunPowerDown 1
+stm32l1xx_hal_flash_ramfunc.c:163:30:HAL_FLASHEx_EraseParallelPage 2
+stm32l1xx_hal_flash_ramfunc.c:224:30:HAL_FLASHEx_ProgramParallelHalfPage 4
+stm32l1xx_hal_flash_ramfunc.c:302:30:HAL_FLASHEx_HalfPageProgram 3
+stm32l1xx_hal_flash_ramfunc.c:394:30:HAL_FLASHEx_GetError 1
+stm32l1xx_hal_flash_ramfunc.c:426:30:HAL_FLASHEx_DATAEEPROM_EraseDoubleWord 2
+stm32l1xx_hal_flash_ramfunc.c:486:30:HAL_FLASHEx_DATAEEPROM_ProgramDoubleWord 2
+stm32l1xx_hal_flash_ramfunc.c:586:37:FLASHRAM_WaitForLastOperation 9
+stm32l1xx_hal_flash_ramfunc.c:540:37:FLASHRAM_SetErrorCode 5
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.cyclo
new file mode 100644
index 0000000..3b1bc1e
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.cyclo
@@ -0,0 +1,8 @@
+stm32l1xx_hal_gpio.c:170:6:HAL_GPIO_Init 19
+stm32l1xx_hal_gpio.c:301:6:HAL_GPIO_DeInit 11
+stm32l1xx_hal_gpio.c:381:15:HAL_GPIO_ReadPin 2
+stm32l1xx_hal_gpio.c:413:6:HAL_GPIO_WritePin 2
+stm32l1xx_hal_gpio.c:435:6:HAL_GPIO_TogglePin 1
+stm32l1xx_hal_gpio.c:469:19:HAL_GPIO_LockPin 2
+stm32l1xx_hal_gpio.c:504:6:HAL_GPIO_EXTI_IRQHandler 2
+stm32l1xx_hal_gpio.c:519:13:HAL_GPIO_EXTI_Callback 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.cyclo
new file mode 100644
index 0000000..0033d53
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.cyclo
@@ -0,0 +1,82 @@
+stm32l1xx_hal_i2c.c:445:19:HAL_I2C_Init 11
+stm32l1xx_hal_i2c.c:560:19:HAL_I2C_DeInit 2
+stm32l1xx_hal_i2c.c:606:13:HAL_I2C_MspInit 1
+stm32l1xx_hal_i2c.c:622:13:HAL_I2C_MspDeInit 1
+stm32l1xx_hal_i2c.c:959:13:I2C_Flush_DR 2
+stm32l1xx_hal_i2c.c:1056:19:HAL_I2C_Master_Transmit 13
+stm32l1xx_hal_i2c.c:1177:19:HAL_I2C_Master_Receive 20
+stm32l1xx_hal_i2c.c:1428:19:HAL_I2C_Slave_Transmit 14
+stm32l1xx_hal_i2c.c:1558:19:HAL_I2C_Slave_Receive 12
+stm32l1xx_hal_i2c.c:1679:19:HAL_I2C_Master_Transmit_IT 6
+stm32l1xx_hal_i2c.c:1756:19:HAL_I2C_Master_Receive_IT 6
+stm32l1xx_hal_i2c.c:1836:19:HAL_I2C_Slave_Transmit_IT 6
+stm32l1xx_hal_i2c.c:1898:19:HAL_I2C_Slave_Receive_IT 6
+stm32l1xx_hal_i2c.c:1962:19:HAL_I2C_Master_Transmit_DMA 9
+stm32l1xx_hal_i2c.c:2115:19:HAL_I2C_Master_Receive_DMA 9
+stm32l1xx_hal_i2c.c:2266:19:HAL_I2C_Slave_Transmit_DMA 8
+stm32l1xx_hal_i2c.c:2378:19:HAL_I2C_Slave_Receive_DMA 8
+stm32l1xx_hal_i2c.c:2495:19:HAL_I2C_Mem_Write 13
+stm32l1xx_hal_i2c.c:2618:19:HAL_I2C_Mem_Read 19
+stm32l1xx_hal_i2c.c:2865:19:HAL_I2C_Mem_Write_IT 6
+stm32l1xx_hal_i2c.c:2950:19:HAL_I2C_Mem_Read_IT 7
+stm32l1xx_hal_i2c.c:3041:19:HAL_I2C_Mem_Write_DMA 10
+stm32l1xx_hal_i2c.c:3221:19:HAL_I2C_Mem_Read_DMA 12
+stm32l1xx_hal_i2c.c:3415:19:HAL_I2C_IsDeviceReady 16
+stm32l1xx_hal_i2c.c:3551:19:HAL_I2C_Master_Seq_Transmit_IT 13
+stm32l1xx_hal_i2c.c:3646:19:HAL_I2C_Master_Seq_Transmit_DMA 23
+stm32l1xx_hal_i2c.c:3826:19:HAL_I2C_Master_Seq_Receive_IT 17
+stm32l1xx_hal_i2c.c:3947:19:HAL_I2C_Master_Seq_Receive_DMA 30
+stm32l1xx_hal_i2c.c:4162:19:HAL_I2C_Slave_Seq_Transmit_IT 6
+stm32l1xx_hal_i2c.c:4228:19:HAL_I2C_Slave_Seq_Transmit_DMA 16
+stm32l1xx_hal_i2c.c:4402:19:HAL_I2C_Slave_Seq_Receive_IT 6
+stm32l1xx_hal_i2c.c:4468:19:HAL_I2C_Slave_Seq_Receive_DMA 16
+stm32l1xx_hal_i2c.c:4638:19:HAL_I2C_EnableListen_IT 3
+stm32l1xx_hal_i2c.c:4671:19:HAL_I2C_DisableListen_IT 2
+stm32l1xx_hal_i2c.c:4706:19:HAL_I2C_Master_Abort_IT 4
+stm32l1xx_hal_i2c.c:4765:6:HAL_I2C_EV_IRQHandler 46
+stm32l1xx_hal_i2c.c:4934:6:HAL_I2C_ER_IRQHandler 18
+stm32l1xx_hal_i2c.c:5014:13:HAL_I2C_MasterTxCpltCallback 1
+stm32l1xx_hal_i2c.c:5030:13:HAL_I2C_MasterRxCpltCallback 1
+stm32l1xx_hal_i2c.c:5045:13:HAL_I2C_SlaveTxCpltCallback 1
+stm32l1xx_hal_i2c.c:5061:13:HAL_I2C_SlaveRxCpltCallback 1
+stm32l1xx_hal_i2c.c:5079:13:HAL_I2C_AddrCallback 1
+stm32l1xx_hal_i2c.c:5097:13:HAL_I2C_ListenCpltCallback 1
+stm32l1xx_hal_i2c.c:5113:13:HAL_I2C_MemTxCpltCallback 1
+stm32l1xx_hal_i2c.c:5129:13:HAL_I2C_MemRxCpltCallback 1
+stm32l1xx_hal_i2c.c:5145:13:HAL_I2C_ErrorCallback 1
+stm32l1xx_hal_i2c.c:5161:13:HAL_I2C_AbortCpltCallback 1
+stm32l1xx_hal_i2c.c:5196:22:HAL_I2C_GetState 1
+stm32l1xx_hal_i2c.c:5208:21:HAL_I2C_GetMode 1
+stm32l1xx_hal_i2c.c:5219:10:HAL_I2C_GetError 1
+stm32l1xx_hal_i2c.c:5242:13:I2C_MasterTransmit_TXE 12
+stm32l1xx_hal_i2c.c:5336:13:I2C_MasterTransmit_BTF 7
+stm32l1xx_hal_i2c.c:5415:13:I2C_MemoryTransmit_TXE_BTF 10
+stm32l1xx_hal_i2c.c:5502:13:I2C_MasterReceive_RXNE 9
+stm32l1xx_hal_i2c.c:5612:13:I2C_MasterReceive_BTF 12
+stm32l1xx_hal_i2c.c:5738:13:I2C_Master_SB 11
+stm32l1xx_hal_i2c.c:5799:13:I2C_Master_ADD10 5
+stm32l1xx_hal_i2c.c:5818:13:I2C_Master_ADDR 33
+stm32l1xx_hal_i2c.c:5963:13:I2C_SlaveTransmit_TXE 4
+stm32l1xx_hal_i2c.c:6004:13:I2C_SlaveTransmit_BTF 2
+stm32l1xx_hal_i2c.c:6025:13:I2C_SlaveReceive_RXNE 4
+stm32l1xx_hal_i2c.c:6066:13:I2C_SlaveReceive_BTF 2
+stm32l1xx_hal_i2c.c:6088:13:I2C_Slave_ADDR 4
+stm32l1xx_hal_i2c.c:6139:13:I2C_Slave_STOPF 19
+stm32l1xx_hal_i2c.c:6308:13:I2C_Slave_AF 5
+stm32l1xx_hal_i2c.c:6377:13:I2C_ITError 21
+stm32l1xx_hal_i2c.c:6543:26:I2C_MasterRequestWrite 10
+stm32l1xx_hal_i2c.c:6613:26:I2C_MasterRequestRead 13
+stm32l1xx_hal_i2c.c:6713:26:I2C_RequestMemoryWrite 9
+stm32l1xx_hal_i2c.c:6793:26:I2C_RequestMemoryRead 14
+stm32l1xx_hal_i2c.c:6902:13:I2C_DMAXferCplt 16
+stm32l1xx_hal_i2c.c:7040:13:I2C_DMAError 3
+stm32l1xx_hal_i2c.c:7075:13:I2C_DMAAbort 9
+stm32l1xx_hal_i2c.c:7178:26:I2C_WaitOnFlagUntilTimeout 8
+stm32l1xx_hal_i2c.c:7215:26:I2C_WaitOnMasterAddressFlagUntilTimeout 9
+stm32l1xx_hal_i2c.c:7269:26:I2C_WaitOnTXEFlagUntilTimeout 7
+stm32l1xx_hal_i2c.c:7310:26:I2C_WaitOnBTFFlagUntilTimeout 7
+stm32l1xx_hal_i2c.c:7351:26:I2C_WaitOnSTOPFlagUntilTimeout 6
+stm32l1xx_hal_i2c.c:7387:26:I2C_WaitOnSTOPRequestThroughIT 3
+stm32l1xx_hal_i2c.c:7416:26:I2C_WaitOnRXNEFlagUntilTimeout 6
+stm32l1xx_hal_i2c.c:7464:26:I2C_IsAcknowledgeFailed 2
+stm32l1xx_hal_i2c.c:7489:13:I2C_ConvertOtherXferOptions 3
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.cyclo
new file mode 100644
index 0000000..069ee21
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.cyclo
@@ -0,0 +1,17 @@
+stm32l1xx_hal_pwr.c:84:6:HAL_PWR_DeInit 1
+stm32l1xx_hal_pwr.c:97:6:HAL_PWR_EnableBkUpAccess 1
+stm32l1xx_hal_pwr.c:110:6:HAL_PWR_DisableBkUpAccess 1
+stm32l1xx_hal_pwr.c:338:6:HAL_PWR_ConfigPVD 5
+stm32l1xx_hal_pwr.c:380:6:HAL_PWR_EnablePVD 1
+stm32l1xx_hal_pwr.c:390:6:HAL_PWR_DisablePVD 1
+stm32l1xx_hal_pwr.c:405:6:HAL_PWR_EnableWakeUpPin 1
+stm32l1xx_hal_pwr.c:422:6:HAL_PWR_DisableWakeUpPin 1
+stm32l1xx_hal_pwr.c:445:6:HAL_PWR_EnterSLEEPMode 2
+stm32l1xx_hal_pwr.c:491:6:HAL_PWR_EnterSTOPMode 2
+stm32l1xx_hal_pwr.c:531:6:HAL_PWR_EnterSTANDBYMode 1
+stm32l1xx_hal_pwr.c:556:6:HAL_PWR_EnableSleepOnExit 1
+stm32l1xx_hal_pwr.c:569:6:HAL_PWR_DisableSleepOnExit 1
+stm32l1xx_hal_pwr.c:582:6:HAL_PWR_EnableSEVOnPend 1
+stm32l1xx_hal_pwr.c:595:6:HAL_PWR_DisableSEVOnPend 1
+stm32l1xx_hal_pwr.c:608:6:HAL_PWR_PVD_IRQHandler 2
+stm32l1xx_hal_pwr.c:625:13:HAL_PWR_PVDCallback 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.cyclo
new file mode 100644
index 0000000..fe540b1
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.cyclo
@@ -0,0 +1,7 @@
+stm32l1xx_hal_pwr_ex.c:65:10:HAL_PWREx_GetVoltageRange 1
+stm32l1xx_hal_pwr_ex.c:78:6:HAL_PWREx_EnableFastWakeUp 1
+stm32l1xx_hal_pwr_ex.c:88:6:HAL_PWREx_DisableFastWakeUp 1
+stm32l1xx_hal_pwr_ex.c:98:6:HAL_PWREx_EnableUltraLowPower 1
+stm32l1xx_hal_pwr_ex.c:108:6:HAL_PWREx_DisableUltraLowPower 1
+stm32l1xx_hal_pwr_ex.c:124:6:HAL_PWREx_EnableLowPowerRunMode 1
+stm32l1xx_hal_pwr_ex.c:135:19:HAL_PWREx_DisableLowPowerRunMode 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.cyclo
new file mode 100644
index 0000000..1bce363
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.cyclo
@@ -0,0 +1,15 @@
+stm32l1xx_hal_rcc.c:226:19:HAL_RCC_DeInit 8
+stm32l1xx_hal_rcc.c:322:19:HAL_RCC_OscConfig 73
+stm32l1xx_hal_rcc.c:797:19:HAL_RCC_ClockConfig 30
+stm32l1xx_hal_rcc.c:1003:6:HAL_RCC_MCOConfig 1
+stm32l1xx_hal_rcc.c:1037:6:HAL_RCC_EnableCSS 1
+stm32l1xx_hal_rcc.c:1046:6:HAL_RCC_DisableCSS 1
+stm32l1xx_hal_rcc.c:1081:10:HAL_RCC_GetSysClockFreq 6
+stm32l1xx_hal_rcc.c:1137:10:HAL_RCC_GetHCLKFreq 1
+stm32l1xx_hal_rcc.c:1148:10:HAL_RCC_GetPCLK1Freq 1
+stm32l1xx_hal_rcc.c:1160:10:HAL_RCC_GetPCLK2Freq 1
+stm32l1xx_hal_rcc.c:1173:6:HAL_RCC_GetOscConfig 9
+stm32l1xx_hal_rcc.c:1269:6:HAL_RCC_GetClockConfig 1
+stm32l1xx_hal_rcc.c:1299:6:HAL_RCC_NMI_IRQHandler 2
+stm32l1xx_hal_rcc.c:1316:13:HAL_RCC_CSSCallback 1
+stm32l1xx_hal_rcc.c:1341:26:RCC_SetFlashLatencyFromMSIRange 7
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.cyclo
new file mode 100644
index 0000000..1505ea8
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.cyclo
@@ -0,0 +1,8 @@
+stm32l1xx_hal_rcc_ex.c:90:19:HAL_RCCEx_PeriphCLKConfig 24
+stm32l1xx_hal_rcc_ex.c:229:6:HAL_RCCEx_GetPeriphCLKConfig 2
+stm32l1xx_hal_rcc_ex.c:266:10:HAL_RCCEx_GetPeriphCLKFreq 12
+stm32l1xx_hal_rcc_ex.c:358:6:HAL_RCCEx_EnableLSECSS 1
+stm32l1xx_hal_rcc_ex.c:371:6:HAL_RCCEx_DisableLSECSS 1
+stm32l1xx_hal_rcc_ex.c:385:6:HAL_RCCEx_EnableLSECSS_IT 1
+stm32l1xx_hal_rcc_ex.c:402:6:HAL_RCCEx_LSECSS_IRQHandler 2
+stm32l1xx_hal_rcc_ex.c:419:13:HAL_RCCEx_LSECSS_Callback 1
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.cyclo
new file mode 100644
index 0000000..e69de29
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.cyclo
new file mode 100644
index 0000000..e69de29
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.cyclo b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.cyclo
new file mode 100644
index 0000000..387596b
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.cyclo
@@ -0,0 +1,62 @@
+stm32l1xx_hal_uart.c:353:19:HAL_UART_Init 3
+stm32l1xx_hal_uart.c:429:19:HAL_HalfDuplex_Init 3
+stm32l1xx_hal_uart.c:503:19:HAL_LIN_Init 3
+stm32l1xx_hal_uart.c:585:19:HAL_MultiProcessor_Init 3
+stm32l1xx_hal_uart.c:663:19:HAL_UART_DeInit 2
+stm32l1xx_hal_uart.c:709:13:HAL_UART_MspInit 1
+stm32l1xx_hal_uart.c:724:13:HAL_UART_MspDeInit 1
+stm32l1xx_hal_uart.c:1129:19:HAL_UART_Transmit 10
+stm32l1xx_hal_uart.c:1211:19:HAL_UART_Receive 12
+stm32l1xx_hal_uart.c:1296:19:HAL_UART_Transmit_IT 4
+stm32l1xx_hal_uart.c:1335:19:HAL_UART_Receive_IT 4
+stm32l1xx_hal_uart.c:1367:19:HAL_UART_Transmit_DMA 5
+stm32l1xx_hal_uart.c:1429:19:HAL_UART_Receive_DMA 4
+stm32l1xx_hal_uart.c:1456:19:HAL_UART_DMAPause 9
+stm32l1xx_hal_uart.c:1487:19:HAL_UART_DMAResume 8
+stm32l1xx_hal_uart.c:1521:19:HAL_UART_DMAStop 9
+stm32l1xx_hal_uart.c:1576:19:HAL_UARTEx_ReceiveToIdle 17
+stm32l1xx_hal_uart.c:1701:19:HAL_UARTEx_ReceiveToIdle_IT 7
+stm32l1xx_hal_uart.c:1761:19:HAL_UARTEx_ReceiveToIdle_DMA 7
+stm32l1xx_hal_uart.c:1829:29:HAL_UARTEx_GetRxEventType 1
+stm32l1xx_hal_uart.c:1847:19:HAL_UART_Abort 15
+stm32l1xx_hal_uart.c:1936:19:HAL_UART_AbortTransmit 7
+stm32l1xx_hal_uart.c:1987:19:HAL_UART_AbortReceive 10
+stm32l1xx_hal_uart.c:2048:19:HAL_UART_Abort_IT 18
+stm32l1xx_hal_uart.c:2183:19:HAL_UART_AbortTransmit_IT 6
+stm32l1xx_hal_uart.c:2260:19:HAL_UART_AbortReceive_IT 9
+stm32l1xx_hal_uart.c:2338:6:HAL_UART_IRQHandler 45
+stm32l1xx_hal_uart.c:2580:13:HAL_UART_TxCpltCallback 1
+stm32l1xx_hal_uart.c:2595:13:HAL_UART_TxHalfCpltCallback 1
+stm32l1xx_hal_uart.c:2610:13:HAL_UART_RxCpltCallback 1
+stm32l1xx_hal_uart.c:2625:13:HAL_UART_RxHalfCpltCallback 1
+stm32l1xx_hal_uart.c:2640:13:HAL_UART_ErrorCallback 1
+stm32l1xx_hal_uart.c:2654:13:HAL_UART_AbortCpltCallback 1
+stm32l1xx_hal_uart.c:2669:13:HAL_UART_AbortTransmitCpltCallback 1
+stm32l1xx_hal_uart.c:2684:13:HAL_UART_AbortReceiveCpltCallback 1
+stm32l1xx_hal_uart.c:2701:13:HAL_UARTEx_RxEventCallback 1
+stm32l1xx_hal_uart.c:2741:19:HAL_LIN_SendBreak 3
+stm32l1xx_hal_uart.c:2768:19:HAL_MultiProcessor_EnterMuteMode 3
+stm32l1xx_hal_uart.c:2796:19:HAL_MultiProcessor_ExitMuteMode 3
+stm32l1xx_hal_uart.c:2824:19:HAL_HalfDuplex_EnableTransmitter 2
+stm32l1xx_hal_uart.c:2859:19:HAL_HalfDuplex_EnableReceiver 2
+stm32l1xx_hal_uart.c:2916:23:HAL_UART_GetState 1
+stm32l1xx_hal_uart.c:2931:10:HAL_UART_GetError 1
+stm32l1xx_hal_uart.c:2976:13:UART_DMATransmitCplt 4
+stm32l1xx_hal_uart.c:3011:13:UART_DMATxHalfCplt 1
+stm32l1xx_hal_uart.c:3030:13:UART_DMAReceiveCplt 8
+stm32l1xx_hal_uart.c:3092:13:UART_DMARxHalfCplt 2
+stm32l1xx_hal_uart.c:3131:13:UART_DMAError 5
+stm32l1xx_hal_uart.c:3173:26:UART_WaitOnFlagUntilTimeout 7
+stm32l1xx_hal_uart.c:3212:19:UART_Start_Receive_IT 2
+stm32l1xx_hal_uart.c:3247:19:UART_Start_Receive_DMA 5
+stm32l1xx_hal_uart.c:3297:13:UART_EndTxTransfer 2
+stm32l1xx_hal_uart.c:3311:13:UART_EndRxTransfer 5
+stm32l1xx_hal_uart.c:3335:13:UART_DMAAbortOnError 1
+stm32l1xx_hal_uart.c:3359:13:UART_DMATxAbortCallback 3
+stm32l1xx_hal_uart.c:3405:13:UART_DMARxAbortCallback 3
+stm32l1xx_hal_uart.c:3451:13:UART_DMATxOnlyAbortCallback 1
+stm32l1xx_hal_uart.c:3479:13:UART_DMARxOnlyAbortCallback 1
+stm32l1xx_hal_uart.c:3505:26:UART_Transmit_IT 5
+stm32l1xx_hal_uart.c:3545:26:UART_EndTransmit_IT 1
+stm32l1xx_hal_uart.c:3570:26:UART_Receive_IT 11
+stm32l1xx_hal_uart.c:3671:13:UART_SetConfig 3
diff --git a/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/subdir.mk b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/subdir.mk
new file mode 100644
index 0000000..d2a1ced
--- /dev/null
+++ b/GPS_DRIVERS/Debug/Drivers/STM32L1xx_HAL_Driver/Src/subdir.mk
@@ -0,0 +1,72 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+# Toolchain: GNU Tools for STM32 (10.3-2021.10)
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables
+C_SRCS += \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.c \
+../Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.c
+
+OBJS += \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.o \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.o
+
+C_DEPS += \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.d \
+./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.d
+
+
+# Each subdirectory must supply rules for building sources it contributes
+Drivers/STM32L1xx_HAL_Driver/Src/%.o Drivers/STM32L1xx_HAL_Driver/Src/%.su Drivers/STM32L1xx_HAL_Driver/Src/%.cyclo: ../Drivers/STM32L1xx_HAL_Driver/Src/%.c Drivers/STM32L1xx_HAL_Driver/Src/subdir.mk
+ arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32L152xE -c -I../Core/Inc -I../Drivers/STM32L1xx_HAL_Driver/Inc -I../Drivers/STM32L1xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32L1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
+
+clean: clean-Drivers-2f-STM32L1xx_HAL_Driver-2f-Src
+
+clean-Drivers-2f-STM32L1xx_HAL_Driver-2f-Src:
+ -$(RM) ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_cortex.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_dma.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_exti.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ramfunc.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_gpio.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_i2c.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_pwr_ex.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rcc_ex.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_tim_ex.su ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.cyclo ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.d ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.o ./Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.su
+
+.PHONY: clean-Drivers-2f-STM32L1xx_HAL_Driver-2f-Src
+
diff --git a/GPS_DRIVERS/Debug/GPS_DRIVERS.list b/GPS_DRIVERS/Debug/GPS_DRIVERS.list
new file mode 100644
index 0000000..84f885f
--- /dev/null
+++ b/GPS_DRIVERS/Debug/GPS_DRIVERS.list
@@ -0,0 +1,12445 @@
+
+GPS_DRIVERS.elf: file format elf32-littlearm
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 .isr_vector 0000013c 08000000 08000000 00010000 2**0
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 1 .text 00004e80 0800013c 0800013c 0001013c 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 2 .rodata 00000288 08004fbc 08004fbc 00014fbc 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 3 .ARM.extab 00000000 08005244 08005244 00020098 2**0
+ CONTENTS
+ 4 .ARM 00000008 08005244 08005244 00015244 2**2
+ CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 5 .preinit_array 00000000 0800524c 0800524c 00020098 2**0
+ CONTENTS, ALLOC, LOAD, DATA
+ 6 .init_array 00000004 0800524c 0800524c 0001524c 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 7 .fini_array 00000004 08005250 08005250 00015250 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 8 .data 00000098 20000000 08005254 00020000 2**2
+ CONTENTS, ALLOC, LOAD, DATA
+ 9 .bss 0000011c 20000098 080052ec 00020098 2**2
+ ALLOC
+ 10 ._user_heap_stack 00000604 200001b4 080052ec 000201b4 2**0
+ ALLOC
+ 11 .ARM.attributes 00000029 00000000 00000000 00020098 2**0
+ CONTENTS, READONLY
+ 12 .debug_info 0000b056 00000000 00000000 000200c1 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 13 .debug_abbrev 00001a47 00000000 00000000 0002b117 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 14 .debug_aranges 000009f0 00000000 00000000 0002cb60 2**3
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 15 .debug_ranges 00000960 00000000 00000000 0002d550 2**3
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 16 .debug_macro 000167f9 00000000 00000000 0002deb0 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 17 .debug_line 0000c81c 00000000 00000000 000446a9 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 18 .debug_str 000884c0 00000000 00000000 00050ec5 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 19 .comment 00000050 00000000 00000000 000d9385 2**0
+ CONTENTS, READONLY
+ 20 .debug_frame 00003124 00000000 00000000 000d93d8 2**2
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+
+Disassembly of section .text:
+
+0800013c <__do_global_dtors_aux>:
+ 800013c: b510 push {r4, lr}
+ 800013e: 4c05 ldr r4, [pc, #20] ; (8000154 <__do_global_dtors_aux+0x18>)
+ 8000140: 7823 ldrb r3, [r4, #0]
+ 8000142: b933 cbnz r3, 8000152 <__do_global_dtors_aux+0x16>
+ 8000144: 4b04 ldr r3, [pc, #16] ; (8000158 <__do_global_dtors_aux+0x1c>)
+ 8000146: b113 cbz r3, 800014e <__do_global_dtors_aux+0x12>
+ 8000148: 4804 ldr r0, [pc, #16] ; (800015c <__do_global_dtors_aux+0x20>)
+ 800014a: f3af 8000 nop.w
+ 800014e: 2301 movs r3, #1
+ 8000150: 7023 strb r3, [r4, #0]
+ 8000152: bd10 pop {r4, pc}
+ 8000154: 20000098 .word 0x20000098
+ 8000158: 00000000 .word 0x00000000
+ 800015c: 08004fa4 .word 0x08004fa4
+
+08000160 :
+ 8000160: b508 push {r3, lr}
+ 8000162: 4b03 ldr r3, [pc, #12] ; (8000170 )
+ 8000164: b11b cbz r3, 800016e
+ 8000166: 4903 ldr r1, [pc, #12] ; (8000174 )
+ 8000168: 4803 ldr r0, [pc, #12] ; (8000178 )
+ 800016a: f3af 8000 nop.w
+ 800016e: bd08 pop {r3, pc}
+ 8000170: 00000000 .word 0x00000000
+ 8000174: 2000009c .word 0x2000009c
+ 8000178: 08004fa4 .word 0x08004fa4
+
+0800017c <__aeabi_uldivmod>:
+ 800017c: b953 cbnz r3, 8000194 <__aeabi_uldivmod+0x18>
+ 800017e: b94a cbnz r2, 8000194 <__aeabi_uldivmod+0x18>
+ 8000180: 2900 cmp r1, #0
+ 8000182: bf08 it eq
+ 8000184: 2800 cmpeq r0, #0
+ 8000186: bf1c itt ne
+ 8000188: f04f 31ff movne.w r1, #4294967295
+ 800018c: f04f 30ff movne.w r0, #4294967295
+ 8000190: f000 b976 b.w 8000480 <__aeabi_idiv0>
+ 8000194: f1ad 0c08 sub.w ip, sp, #8
+ 8000198: e96d ce04 strd ip, lr, [sp, #-16]!
+ 800019c: f000 f806 bl 80001ac <__udivmoddi4>
+ 80001a0: f8dd e004 ldr.w lr, [sp, #4]
+ 80001a4: e9dd 2302 ldrd r2, r3, [sp, #8]
+ 80001a8: b004 add sp, #16
+ 80001aa: 4770 bx lr
+
+080001ac <__udivmoddi4>:
+ 80001ac: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ 80001b0: 9e08 ldr r6, [sp, #32]
+ 80001b2: 460d mov r5, r1
+ 80001b4: 4604 mov r4, r0
+ 80001b6: 4688 mov r8, r1
+ 80001b8: 2b00 cmp r3, #0
+ 80001ba: d14d bne.n 8000258 <__udivmoddi4+0xac>
+ 80001bc: 428a cmp r2, r1
+ 80001be: 4694 mov ip, r2
+ 80001c0: d968 bls.n 8000294 <__udivmoddi4+0xe8>
+ 80001c2: fab2 f282 clz r2, r2
+ 80001c6: b152 cbz r2, 80001de <__udivmoddi4+0x32>
+ 80001c8: fa01 f302 lsl.w r3, r1, r2
+ 80001cc: f1c2 0120 rsb r1, r2, #32
+ 80001d0: fa20 f101 lsr.w r1, r0, r1
+ 80001d4: fa0c fc02 lsl.w ip, ip, r2
+ 80001d8: ea41 0803 orr.w r8, r1, r3
+ 80001dc: 4094 lsls r4, r2
+ 80001de: ea4f 411c mov.w r1, ip, lsr #16
+ 80001e2: fbb8 f7f1 udiv r7, r8, r1
+ 80001e6: fa1f fe8c uxth.w lr, ip
+ 80001ea: fb01 8817 mls r8, r1, r7, r8
+ 80001ee: fb07 f00e mul.w r0, r7, lr
+ 80001f2: 0c23 lsrs r3, r4, #16
+ 80001f4: ea43 4308 orr.w r3, r3, r8, lsl #16
+ 80001f8: 4298 cmp r0, r3
+ 80001fa: d90a bls.n 8000212 <__udivmoddi4+0x66>
+ 80001fc: eb1c 0303 adds.w r3, ip, r3
+ 8000200: f107 35ff add.w r5, r7, #4294967295
+ 8000204: f080 811e bcs.w 8000444 <__udivmoddi4+0x298>
+ 8000208: 4298 cmp r0, r3
+ 800020a: f240 811b bls.w 8000444 <__udivmoddi4+0x298>
+ 800020e: 3f02 subs r7, #2
+ 8000210: 4463 add r3, ip
+ 8000212: 1a1b subs r3, r3, r0
+ 8000214: fbb3 f0f1 udiv r0, r3, r1
+ 8000218: fb01 3310 mls r3, r1, r0, r3
+ 800021c: fb00 fe0e mul.w lr, r0, lr
+ 8000220: b2a4 uxth r4, r4
+ 8000222: ea44 4403 orr.w r4, r4, r3, lsl #16
+ 8000226: 45a6 cmp lr, r4
+ 8000228: d90a bls.n 8000240 <__udivmoddi4+0x94>
+ 800022a: eb1c 0404 adds.w r4, ip, r4
+ 800022e: f100 33ff add.w r3, r0, #4294967295
+ 8000232: f080 8109 bcs.w 8000448 <__udivmoddi4+0x29c>
+ 8000236: 45a6 cmp lr, r4
+ 8000238: f240 8106 bls.w 8000448 <__udivmoddi4+0x29c>
+ 800023c: 4464 add r4, ip
+ 800023e: 3802 subs r0, #2
+ 8000240: 2100 movs r1, #0
+ 8000242: eba4 040e sub.w r4, r4, lr
+ 8000246: ea40 4007 orr.w r0, r0, r7, lsl #16
+ 800024a: b11e cbz r6, 8000254 <__udivmoddi4+0xa8>
+ 800024c: 2300 movs r3, #0
+ 800024e: 40d4 lsrs r4, r2
+ 8000250: e9c6 4300 strd r4, r3, [r6]
+ 8000254: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+ 8000258: 428b cmp r3, r1
+ 800025a: d908 bls.n 800026e <__udivmoddi4+0xc2>
+ 800025c: 2e00 cmp r6, #0
+ 800025e: f000 80ee beq.w 800043e <__udivmoddi4+0x292>
+ 8000262: 2100 movs r1, #0
+ 8000264: e9c6 0500 strd r0, r5, [r6]
+ 8000268: 4608 mov r0, r1
+ 800026a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+ 800026e: fab3 f183 clz r1, r3
+ 8000272: 2900 cmp r1, #0
+ 8000274: d14a bne.n 800030c <__udivmoddi4+0x160>
+ 8000276: 42ab cmp r3, r5
+ 8000278: d302 bcc.n 8000280 <__udivmoddi4+0xd4>
+ 800027a: 4282 cmp r2, r0
+ 800027c: f200 80fc bhi.w 8000478 <__udivmoddi4+0x2cc>
+ 8000280: 1a84 subs r4, r0, r2
+ 8000282: eb65 0303 sbc.w r3, r5, r3
+ 8000286: 2001 movs r0, #1
+ 8000288: 4698 mov r8, r3
+ 800028a: 2e00 cmp r6, #0
+ 800028c: d0e2 beq.n 8000254 <__udivmoddi4+0xa8>
+ 800028e: e9c6 4800 strd r4, r8, [r6]
+ 8000292: e7df b.n 8000254 <__udivmoddi4+0xa8>
+ 8000294: b902 cbnz r2, 8000298 <__udivmoddi4+0xec>
+ 8000296: deff udf #255 ; 0xff
+ 8000298: fab2 f282 clz r2, r2
+ 800029c: 2a00 cmp r2, #0
+ 800029e: f040 8091 bne.w 80003c4 <__udivmoddi4+0x218>
+ 80002a2: eba1 000c sub.w r0, r1, ip
+ 80002a6: 2101 movs r1, #1
+ 80002a8: ea4f 471c mov.w r7, ip, lsr #16
+ 80002ac: fa1f fe8c uxth.w lr, ip
+ 80002b0: fbb0 f3f7 udiv r3, r0, r7
+ 80002b4: fb07 0013 mls r0, r7, r3, r0
+ 80002b8: 0c25 lsrs r5, r4, #16
+ 80002ba: ea45 4500 orr.w r5, r5, r0, lsl #16
+ 80002be: fb0e f003 mul.w r0, lr, r3
+ 80002c2: 42a8 cmp r0, r5
+ 80002c4: d908 bls.n 80002d8 <__udivmoddi4+0x12c>
+ 80002c6: eb1c 0505 adds.w r5, ip, r5
+ 80002ca: f103 38ff add.w r8, r3, #4294967295
+ 80002ce: d202 bcs.n 80002d6 <__udivmoddi4+0x12a>
+ 80002d0: 42a8 cmp r0, r5
+ 80002d2: f200 80ce bhi.w 8000472 <__udivmoddi4+0x2c6>
+ 80002d6: 4643 mov r3, r8
+ 80002d8: 1a2d subs r5, r5, r0
+ 80002da: fbb5 f0f7 udiv r0, r5, r7
+ 80002de: fb07 5510 mls r5, r7, r0, r5
+ 80002e2: fb0e fe00 mul.w lr, lr, r0
+ 80002e6: b2a4 uxth r4, r4
+ 80002e8: ea44 4405 orr.w r4, r4, r5, lsl #16
+ 80002ec: 45a6 cmp lr, r4
+ 80002ee: d908 bls.n 8000302 <__udivmoddi4+0x156>
+ 80002f0: eb1c 0404 adds.w r4, ip, r4
+ 80002f4: f100 35ff add.w r5, r0, #4294967295
+ 80002f8: d202 bcs.n 8000300 <__udivmoddi4+0x154>
+ 80002fa: 45a6 cmp lr, r4
+ 80002fc: f200 80b6 bhi.w 800046c <__udivmoddi4+0x2c0>
+ 8000300: 4628 mov r0, r5
+ 8000302: eba4 040e sub.w r4, r4, lr
+ 8000306: ea40 4003 orr.w r0, r0, r3, lsl #16
+ 800030a: e79e b.n 800024a <__udivmoddi4+0x9e>
+ 800030c: f1c1 0720 rsb r7, r1, #32
+ 8000310: 408b lsls r3, r1
+ 8000312: fa22 fc07 lsr.w ip, r2, r7
+ 8000316: ea4c 0c03 orr.w ip, ip, r3
+ 800031a: fa25 fa07 lsr.w sl, r5, r7
+ 800031e: ea4f 491c mov.w r9, ip, lsr #16
+ 8000322: fbba f8f9 udiv r8, sl, r9
+ 8000326: fa20 f307 lsr.w r3, r0, r7
+ 800032a: fb09 aa18 mls sl, r9, r8, sl
+ 800032e: 408d lsls r5, r1
+ 8000330: fa1f fe8c uxth.w lr, ip
+ 8000334: 431d orrs r5, r3
+ 8000336: fa00 f301 lsl.w r3, r0, r1
+ 800033a: fb08 f00e mul.w r0, r8, lr
+ 800033e: 0c2c lsrs r4, r5, #16
+ 8000340: ea44 440a orr.w r4, r4, sl, lsl #16
+ 8000344: 42a0 cmp r0, r4
+ 8000346: fa02 f201 lsl.w r2, r2, r1
+ 800034a: d90b bls.n 8000364 <__udivmoddi4+0x1b8>
+ 800034c: eb1c 0404 adds.w r4, ip, r4
+ 8000350: f108 3aff add.w sl, r8, #4294967295
+ 8000354: f080 8088 bcs.w 8000468 <__udivmoddi4+0x2bc>
+ 8000358: 42a0 cmp r0, r4
+ 800035a: f240 8085 bls.w 8000468 <__udivmoddi4+0x2bc>
+ 800035e: f1a8 0802 sub.w r8, r8, #2
+ 8000362: 4464 add r4, ip
+ 8000364: 1a24 subs r4, r4, r0
+ 8000366: fbb4 f0f9 udiv r0, r4, r9
+ 800036a: fb09 4410 mls r4, r9, r0, r4
+ 800036e: fb00 fe0e mul.w lr, r0, lr
+ 8000372: b2ad uxth r5, r5
+ 8000374: ea45 4404 orr.w r4, r5, r4, lsl #16
+ 8000378: 45a6 cmp lr, r4
+ 800037a: d908 bls.n 800038e <__udivmoddi4+0x1e2>
+ 800037c: eb1c 0404 adds.w r4, ip, r4
+ 8000380: f100 35ff add.w r5, r0, #4294967295
+ 8000384: d26c bcs.n 8000460 <__udivmoddi4+0x2b4>
+ 8000386: 45a6 cmp lr, r4
+ 8000388: d96a bls.n 8000460 <__udivmoddi4+0x2b4>
+ 800038a: 3802 subs r0, #2
+ 800038c: 4464 add r4, ip
+ 800038e: ea40 4008 orr.w r0, r0, r8, lsl #16
+ 8000392: fba0 9502 umull r9, r5, r0, r2
+ 8000396: eba4 040e sub.w r4, r4, lr
+ 800039a: 42ac cmp r4, r5
+ 800039c: 46c8 mov r8, r9
+ 800039e: 46ae mov lr, r5
+ 80003a0: d356 bcc.n 8000450 <__udivmoddi4+0x2a4>
+ 80003a2: d053 beq.n 800044c <__udivmoddi4+0x2a0>
+ 80003a4: 2e00 cmp r6, #0
+ 80003a6: d069 beq.n 800047c <__udivmoddi4+0x2d0>
+ 80003a8: ebb3 0208 subs.w r2, r3, r8
+ 80003ac: eb64 040e sbc.w r4, r4, lr
+ 80003b0: fa22 f301 lsr.w r3, r2, r1
+ 80003b4: fa04 f707 lsl.w r7, r4, r7
+ 80003b8: 431f orrs r7, r3
+ 80003ba: 40cc lsrs r4, r1
+ 80003bc: e9c6 7400 strd r7, r4, [r6]
+ 80003c0: 2100 movs r1, #0
+ 80003c2: e747 b.n 8000254 <__udivmoddi4+0xa8>
+ 80003c4: fa0c fc02 lsl.w ip, ip, r2
+ 80003c8: f1c2 0120 rsb r1, r2, #32
+ 80003cc: fa25 f301 lsr.w r3, r5, r1
+ 80003d0: ea4f 471c mov.w r7, ip, lsr #16
+ 80003d4: fa20 f101 lsr.w r1, r0, r1
+ 80003d8: 4095 lsls r5, r2
+ 80003da: 430d orrs r5, r1
+ 80003dc: fbb3 f1f7 udiv r1, r3, r7
+ 80003e0: fb07 3311 mls r3, r7, r1, r3
+ 80003e4: fa1f fe8c uxth.w lr, ip
+ 80003e8: 0c28 lsrs r0, r5, #16
+ 80003ea: ea40 4003 orr.w r0, r0, r3, lsl #16
+ 80003ee: fb01 f30e mul.w r3, r1, lr
+ 80003f2: 4283 cmp r3, r0
+ 80003f4: fa04 f402 lsl.w r4, r4, r2
+ 80003f8: d908 bls.n 800040c <__udivmoddi4+0x260>
+ 80003fa: eb1c 0000 adds.w r0, ip, r0
+ 80003fe: f101 38ff add.w r8, r1, #4294967295
+ 8000402: d22f bcs.n 8000464 <__udivmoddi4+0x2b8>
+ 8000404: 4283 cmp r3, r0
+ 8000406: d92d bls.n 8000464 <__udivmoddi4+0x2b8>
+ 8000408: 3902 subs r1, #2
+ 800040a: 4460 add r0, ip
+ 800040c: 1ac0 subs r0, r0, r3
+ 800040e: fbb0 f3f7 udiv r3, r0, r7
+ 8000412: fb07 0013 mls r0, r7, r3, r0
+ 8000416: b2ad uxth r5, r5
+ 8000418: ea45 4500 orr.w r5, r5, r0, lsl #16
+ 800041c: fb03 f00e mul.w r0, r3, lr
+ 8000420: 42a8 cmp r0, r5
+ 8000422: d908 bls.n 8000436 <__udivmoddi4+0x28a>
+ 8000424: eb1c 0505 adds.w r5, ip, r5
+ 8000428: f103 38ff add.w r8, r3, #4294967295
+ 800042c: d216 bcs.n 800045c <__udivmoddi4+0x2b0>
+ 800042e: 42a8 cmp r0, r5
+ 8000430: d914 bls.n 800045c <__udivmoddi4+0x2b0>
+ 8000432: 3b02 subs r3, #2
+ 8000434: 4465 add r5, ip
+ 8000436: 1a28 subs r0, r5, r0
+ 8000438: ea43 4101 orr.w r1, r3, r1, lsl #16
+ 800043c: e738 b.n 80002b0 <__udivmoddi4+0x104>
+ 800043e: 4631 mov r1, r6
+ 8000440: 4630 mov r0, r6
+ 8000442: e707 b.n 8000254 <__udivmoddi4+0xa8>
+ 8000444: 462f mov r7, r5
+ 8000446: e6e4 b.n 8000212 <__udivmoddi4+0x66>
+ 8000448: 4618 mov r0, r3
+ 800044a: e6f9 b.n 8000240 <__udivmoddi4+0x94>
+ 800044c: 454b cmp r3, r9
+ 800044e: d2a9 bcs.n 80003a4 <__udivmoddi4+0x1f8>
+ 8000450: ebb9 0802 subs.w r8, r9, r2
+ 8000454: eb65 0e0c sbc.w lr, r5, ip
+ 8000458: 3801 subs r0, #1
+ 800045a: e7a3 b.n 80003a4 <__udivmoddi4+0x1f8>
+ 800045c: 4643 mov r3, r8
+ 800045e: e7ea b.n 8000436 <__udivmoddi4+0x28a>
+ 8000460: 4628 mov r0, r5
+ 8000462: e794 b.n 800038e <__udivmoddi4+0x1e2>
+ 8000464: 4641 mov r1, r8
+ 8000466: e7d1 b.n 800040c <__udivmoddi4+0x260>
+ 8000468: 46d0 mov r8, sl
+ 800046a: e77b b.n 8000364 <__udivmoddi4+0x1b8>
+ 800046c: 4464 add r4, ip
+ 800046e: 3802 subs r0, #2
+ 8000470: e747 b.n 8000302 <__udivmoddi4+0x156>
+ 8000472: 3b02 subs r3, #2
+ 8000474: 4465 add r5, ip
+ 8000476: e72f b.n 80002d8 <__udivmoddi4+0x12c>
+ 8000478: 4608 mov r0, r1
+ 800047a: e706 b.n 800028a <__udivmoddi4+0xde>
+ 800047c: 4631 mov r1, r6
+ 800047e: e6e9 b.n 8000254 <__udivmoddi4+0xa8>
+
+08000480 <__aeabi_idiv0>:
+ 8000480: 4770 bx lr
+ 8000482: bf00 nop
+
+08000484 :
+ * After calculating the checksum values CK_A and CK_B, return it as a 16 bit unsigned integer
+ * Where CK_A is the high byte, and CK_B is the low byte
+ *
+ * Check documentation if you need more info, details in header file
+ */
+uint16_t UBX_M8N_CHECKSUM(uint8_t* buffer, uint8_t buflen) {
+ 8000484: b480 push {r7}
+ 8000486: b085 sub sp, #20
+ 8000488: af00 add r7, sp, #0
+ 800048a: 6078 str r0, [r7, #4]
+ 800048c: 460b mov r3, r1
+ 800048e: 70fb strb r3, [r7, #3]
+
+ // These values will be used to compare with the buffer's
+ uint8_t CK_A = 0, CK_B = 0;
+ 8000490: 2300 movs r3, #0
+ 8000492: 73fb strb r3, [r7, #15]
+ 8000494: 2300 movs r3, #0
+ 8000496: 73bb strb r3, [r7, #14]
+
+ // loop to go through buffer payload
+ // start at index 2 since first two bytes of buffer are not included in checksum calculation
+ // do not include last 2 bytes of buffer since they are also not included in checksum calculation
+ for (int i = 2; i < buflen - 2; i++) {
+ 8000498: 2302 movs r3, #2
+ 800049a: 60bb str r3, [r7, #8]
+ 800049c: e00d b.n 80004ba
+ CK_A = CK_A + buffer[i];
+ 800049e: 68bb ldr r3, [r7, #8]
+ 80004a0: 687a ldr r2, [r7, #4]
+ 80004a2: 4413 add r3, r2
+ 80004a4: 781a ldrb r2, [r3, #0]
+ 80004a6: 7bfb ldrb r3, [r7, #15]
+ 80004a8: 4413 add r3, r2
+ 80004aa: 73fb strb r3, [r7, #15]
+ CK_B = CK_B + CK_A;
+ 80004ac: 7bba ldrb r2, [r7, #14]
+ 80004ae: 7bfb ldrb r3, [r7, #15]
+ 80004b0: 4413 add r3, r2
+ 80004b2: 73bb strb r3, [r7, #14]
+ for (int i = 2; i < buflen - 2; i++) {
+ 80004b4: 68bb ldr r3, [r7, #8]
+ 80004b6: 3301 adds r3, #1
+ 80004b8: 60bb str r3, [r7, #8]
+ 80004ba: 78fb ldrb r3, [r7, #3]
+ 80004bc: 3b02 subs r3, #2
+ 80004be: 68ba ldr r2, [r7, #8]
+ 80004c0: 429a cmp r2, r3
+ 80004c2: dbec blt.n 800049e
+ // After calculating checksum, compare with checksum bytes from buffer
+ // Return 1 if both are equal to buffer checksum, return 0 if not
+ // return ((CK_A == buffer[buflen - 2]) && (CK_B == buffer[buflen - 1]));
+
+ // return 2 byte checksum
+ return ((CK_A<<8) | CK_B);
+ 80004c4: 7bfb ldrb r3, [r7, #15]
+ 80004c6: 021b lsls r3, r3, #8
+ 80004c8: b21a sxth r2, r3
+ 80004ca: 7bbb ldrb r3, [r7, #14]
+ 80004cc: b21b sxth r3, r3
+ 80004ce: 4313 orrs r3, r2
+ 80004d0: b21b sxth r3, r3
+ 80004d2: b29b uxth r3, r3
+}
+ 80004d4: 4618 mov r0, r3
+ 80004d6: 3714 adds r7, #20
+ 80004d8: 46bd mov sp, r7
+ 80004da: bc80 pop {r7}
+ 80004dc: 4770 bx lr
+
+080004de :
+
+/* This function parses the payload from a NAV_POSLLH message
+ * The payload is in little endian format, so left shift the bytes
+ * Follow reference from driver and protocol description
+ */
+void UBX_M8N_NAV_POSLLH_Parsing(uint8_t *buffer, NavData* data) {
+ 80004de: b480 push {r7}
+ 80004e0: b083 sub sp, #12
+ 80004e2: af00 add r7, sp, #0
+ 80004e4: 6078 str r0, [r7, #4]
+ 80004e6: 6039 str r1, [r7, #0]
+ data->iTOW = buffer[9]<<24 | buffer[8]<<16 | buffer[7]<<8 | buffer[6];
+ 80004e8: 687b ldr r3, [r7, #4]
+ 80004ea: 3309 adds r3, #9
+ 80004ec: 781b ldrb r3, [r3, #0]
+ 80004ee: 061a lsls r2, r3, #24
+ 80004f0: 687b ldr r3, [r7, #4]
+ 80004f2: 3308 adds r3, #8
+ 80004f4: 781b ldrb r3, [r3, #0]
+ 80004f6: 041b lsls r3, r3, #16
+ 80004f8: 431a orrs r2, r3
+ 80004fa: 687b ldr r3, [r7, #4]
+ 80004fc: 3307 adds r3, #7
+ 80004fe: 781b ldrb r3, [r3, #0]
+ 8000500: 021b lsls r3, r3, #8
+ 8000502: 4313 orrs r3, r2
+ 8000504: 687a ldr r2, [r7, #4]
+ 8000506: 3206 adds r2, #6
+ 8000508: 7812 ldrb r2, [r2, #0]
+ 800050a: 4313 orrs r3, r2
+ 800050c: 461a mov r2, r3
+ 800050e: 683b ldr r3, [r7, #0]
+ 8000510: 601a str r2, [r3, #0]
+ data->lon = buffer[13]<<24 | buffer[12]<<16 | buffer[11]<<8 | buffer[10];
+ 8000512: 687b ldr r3, [r7, #4]
+ 8000514: 330d adds r3, #13
+ 8000516: 781b ldrb r3, [r3, #0]
+ 8000518: 061a lsls r2, r3, #24
+ 800051a: 687b ldr r3, [r7, #4]
+ 800051c: 330c adds r3, #12
+ 800051e: 781b ldrb r3, [r3, #0]
+ 8000520: 041b lsls r3, r3, #16
+ 8000522: 431a orrs r2, r3
+ 8000524: 687b ldr r3, [r7, #4]
+ 8000526: 330b adds r3, #11
+ 8000528: 781b ldrb r3, [r3, #0]
+ 800052a: 021b lsls r3, r3, #8
+ 800052c: 4313 orrs r3, r2
+ 800052e: 687a ldr r2, [r7, #4]
+ 8000530: 320a adds r2, #10
+ 8000532: 7812 ldrb r2, [r2, #0]
+ 8000534: 431a orrs r2, r3
+ 8000536: 683b ldr r3, [r7, #0]
+ 8000538: 605a str r2, [r3, #4]
+ data->lat = buffer[17]<<24 | buffer[16]<<16 | buffer[15]<<8 | buffer[14];
+ 800053a: 687b ldr r3, [r7, #4]
+ 800053c: 3311 adds r3, #17
+ 800053e: 781b ldrb r3, [r3, #0]
+ 8000540: 061a lsls r2, r3, #24
+ 8000542: 687b ldr r3, [r7, #4]
+ 8000544: 3310 adds r3, #16
+ 8000546: 781b ldrb r3, [r3, #0]
+ 8000548: 041b lsls r3, r3, #16
+ 800054a: 431a orrs r2, r3
+ 800054c: 687b ldr r3, [r7, #4]
+ 800054e: 330f adds r3, #15
+ 8000550: 781b ldrb r3, [r3, #0]
+ 8000552: 021b lsls r3, r3, #8
+ 8000554: 4313 orrs r3, r2
+ 8000556: 687a ldr r2, [r7, #4]
+ 8000558: 320e adds r2, #14
+ 800055a: 7812 ldrb r2, [r2, #0]
+ 800055c: 431a orrs r2, r3
+ 800055e: 683b ldr r3, [r7, #0]
+ 8000560: 609a str r2, [r3, #8]
+ data->height = buffer[21]<<24 | buffer[20]<<16 | buffer[19]<<8 | buffer[18];
+ 8000562: 687b ldr r3, [r7, #4]
+ 8000564: 3315 adds r3, #21
+ 8000566: 781b ldrb r3, [r3, #0]
+ 8000568: 061a lsls r2, r3, #24
+ 800056a: 687b ldr r3, [r7, #4]
+ 800056c: 3314 adds r3, #20
+ 800056e: 781b ldrb r3, [r3, #0]
+ 8000570: 041b lsls r3, r3, #16
+ 8000572: 431a orrs r2, r3
+ 8000574: 687b ldr r3, [r7, #4]
+ 8000576: 3313 adds r3, #19
+ 8000578: 781b ldrb r3, [r3, #0]
+ 800057a: 021b lsls r3, r3, #8
+ 800057c: 4313 orrs r3, r2
+ 800057e: 687a ldr r2, [r7, #4]
+ 8000580: 3212 adds r2, #18
+ 8000582: 7812 ldrb r2, [r2, #0]
+ 8000584: 431a orrs r2, r3
+ 8000586: 683b ldr r3, [r7, #0]
+ 8000588: 60da str r2, [r3, #12]
+ data->hMSL = buffer[25]<<24 | buffer[24]<<16 | buffer[23]<<8 | buffer[22];
+ 800058a: 687b ldr r3, [r7, #4]
+ 800058c: 3319 adds r3, #25
+ 800058e: 781b ldrb r3, [r3, #0]
+ 8000590: 061a lsls r2, r3, #24
+ 8000592: 687b ldr r3, [r7, #4]
+ 8000594: 3318 adds r3, #24
+ 8000596: 781b ldrb r3, [r3, #0]
+ 8000598: 041b lsls r3, r3, #16
+ 800059a: 431a orrs r2, r3
+ 800059c: 687b ldr r3, [r7, #4]
+ 800059e: 3317 adds r3, #23
+ 80005a0: 781b ldrb r3, [r3, #0]
+ 80005a2: 021b lsls r3, r3, #8
+ 80005a4: 4313 orrs r3, r2
+ 80005a6: 687a ldr r2, [r7, #4]
+ 80005a8: 3216 adds r2, #22
+ 80005aa: 7812 ldrb r2, [r2, #0]
+ 80005ac: 431a orrs r2, r3
+ 80005ae: 683b ldr r3, [r7, #0]
+ 80005b0: 611a str r2, [r3, #16]
+ data->hAcc = buffer[29]<<24 | buffer[28]<<16 | buffer[27]<<8 | buffer[26];
+ 80005b2: 687b ldr r3, [r7, #4]
+ 80005b4: 331d adds r3, #29
+ 80005b6: 781b ldrb r3, [r3, #0]
+ 80005b8: 061a lsls r2, r3, #24
+ 80005ba: 687b ldr r3, [r7, #4]
+ 80005bc: 331c adds r3, #28
+ 80005be: 781b ldrb r3, [r3, #0]
+ 80005c0: 041b lsls r3, r3, #16
+ 80005c2: 431a orrs r2, r3
+ 80005c4: 687b ldr r3, [r7, #4]
+ 80005c6: 331b adds r3, #27
+ 80005c8: 781b ldrb r3, [r3, #0]
+ 80005ca: 021b lsls r3, r3, #8
+ 80005cc: 4313 orrs r3, r2
+ 80005ce: 687a ldr r2, [r7, #4]
+ 80005d0: 321a adds r2, #26
+ 80005d2: 7812 ldrb r2, [r2, #0]
+ 80005d4: 4313 orrs r3, r2
+ 80005d6: 461a mov r2, r3
+ 80005d8: 683b ldr r3, [r7, #0]
+ 80005da: 615a str r2, [r3, #20]
+ data->vAcc = buffer[33]<<24 | buffer[32]<<16 | buffer[31]<<8 | buffer[30];
+ 80005dc: 687b ldr r3, [r7, #4]
+ 80005de: 3321 adds r3, #33 ; 0x21
+ 80005e0: 781b ldrb r3, [r3, #0]
+ 80005e2: 061a lsls r2, r3, #24
+ 80005e4: 687b ldr r3, [r7, #4]
+ 80005e6: 3320 adds r3, #32
+ 80005e8: 781b ldrb r3, [r3, #0]
+ 80005ea: 041b lsls r3, r3, #16
+ 80005ec: 431a orrs r2, r3
+ 80005ee: 687b ldr r3, [r7, #4]
+ 80005f0: 331f adds r3, #31
+ 80005f2: 781b ldrb r3, [r3, #0]
+ 80005f4: 021b lsls r3, r3, #8
+ 80005f6: 4313 orrs r3, r2
+ 80005f8: 687a ldr r2, [r7, #4]
+ 80005fa: 321e adds r2, #30
+ 80005fc: 7812 ldrb r2, [r2, #0]
+ 80005fe: 4313 orrs r3, r2
+ 8000600: 461a mov r2, r3
+ 8000602: 683b ldr r3, [r7, #0]
+ 8000604: 619a str r2, [r3, #24]
+}
+ 8000606: bf00 nop
+ 8000608: 370c adds r7, #12
+ 800060a: 46bd mov sp, r7
+ 800060c: bc80 pop {r7}
+ 800060e: 4770 bx lr
+
+08000610 :
+
+/* This function sets a desired configuration in the GPS receiver
+ * It takes in a pointer to the configuration message buffer, as well as its size
+ * Calls Error_Handler() if something goes wrong
+*/
+void CONFIG_Transmit(uint8_t* buffer, uint16_t buflen) {
+ 8000610: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ 8000614: b092 sub sp, #72 ; 0x48
+ 8000616: af08 add r7, sp, #32
+ 8000618: 6178 str r0, [r7, #20]
+ 800061a: 460b mov r3, r1
+ 800061c: 827b strh r3, [r7, #18]
+ HAL_StatusTypeDef hal; // HAL return status
+ printf("Size of config: %d\r\n", buflen);
+ 800061e: 8a7b ldrh r3, [r7, #18]
+ 8000620: 4619 mov r1, r3
+ 8000622: 4856 ldr r0, [pc, #344] ; (800077c )
+ 8000624: f003 fcb4 bl 8003f90
+
+ for (int i = 0; i < 2; i++) {
+ 8000628: 2300 movs r3, #0
+ 800062a: 627b str r3, [r7, #36] ; 0x24
+ 800062c: e09b b.n 8000766
+ // transmit desired CONFIG to GPS receiver
+ hal = HAL_I2C_Mem_Write(&hi2c1, GPS_DEVICE_ADDRESS, GPS_DATA_LENGTH_HIGH, 1, &buffer[0], buflen, HAL_MAX_DELAY);
+ 800062e: f04f 33ff mov.w r3, #4294967295
+ 8000632: 9302 str r3, [sp, #8]
+ 8000634: 8a7b ldrh r3, [r7, #18]
+ 8000636: 9301 str r3, [sp, #4]
+ 8000638: 697b ldr r3, [r7, #20]
+ 800063a: 9300 str r3, [sp, #0]
+ 800063c: 2301 movs r3, #1
+ 800063e: 22fd movs r2, #253 ; 0xfd
+ 8000640: 2184 movs r1, #132 ; 0x84
+ 8000642: 484f ldr r0, [pc, #316] ; (8000780 )
+ 8000644: f001 fc74 bl 8001f30
+ 8000648: 4603 mov r3, r0
+ 800064a: f887 3023 strb.w r3, [r7, #35] ; 0x23
+ if (hal != HAL_OK) {
+ 800064e: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
+ 8000652: 2b00 cmp r3, #0
+ 8000654: d002 beq.n 800065c
+ printf("CONFIG transmit went wrong\r\n");
+ 8000656: 484b ldr r0, [pc, #300] ; (8000784 )
+ 8000658: f003 fd20 bl 800409c
+ }
+ // get the length of the CONFIG message response
+ uint16_t message_length = UBX_GET_LENGTH();
+ 800065c: f000 f89c bl 8000798
+ 8000660: 4603 mov r3, r0
+ 8000662: 843b strh r3, [r7, #32]
+ printf("Message Length: %d\r\n", message_length);
+ 8000664: 8c3b ldrh r3, [r7, #32]
+ 8000666: 4619 mov r1, r3
+ 8000668: 4847 ldr r0, [pc, #284] ; (8000788 )
+ 800066a: f003 fc91 bl 8003f90
+
+ if (message_length != 0) {
+ 800066e: 8c3b ldrh r3, [r7, #32]
+ 8000670: 2b00 cmp r3, #0
+ 8000672: d075 beq.n 8000760
+ 8000674: 466b mov r3, sp
+ 8000676: 469a mov sl, r3
+ // create a buffer of
+ uint8_t config_response[message_length];
+ 8000678: 8c39 ldrh r1, [r7, #32]
+ 800067a: 460b mov r3, r1
+ 800067c: 3b01 subs r3, #1
+ 800067e: 61fb str r3, [r7, #28]
+ 8000680: b28b uxth r3, r1
+ 8000682: 2200 movs r2, #0
+ 8000684: 461c mov r4, r3
+ 8000686: 4615 mov r5, r2
+ 8000688: f04f 0200 mov.w r2, #0
+ 800068c: f04f 0300 mov.w r3, #0
+ 8000690: 00eb lsls r3, r5, #3
+ 8000692: ea43 7354 orr.w r3, r3, r4, lsr #29
+ 8000696: 00e2 lsls r2, r4, #3
+ 8000698: b28b uxth r3, r1
+ 800069a: 2200 movs r2, #0
+ 800069c: 4698 mov r8, r3
+ 800069e: 4691 mov r9, r2
+ 80006a0: f04f 0200 mov.w r2, #0
+ 80006a4: f04f 0300 mov.w r3, #0
+ 80006a8: ea4f 03c9 mov.w r3, r9, lsl #3
+ 80006ac: ea43 7358 orr.w r3, r3, r8, lsr #29
+ 80006b0: ea4f 02c8 mov.w r2, r8, lsl #3
+ 80006b4: 460b mov r3, r1
+ 80006b6: 3307 adds r3, #7
+ 80006b8: 08db lsrs r3, r3, #3
+ 80006ba: 00db lsls r3, r3, #3
+ 80006bc: ebad 0d03 sub.w sp, sp, r3
+ 80006c0: ab08 add r3, sp, #32
+ 80006c2: 3300 adds r3, #0
+ 80006c4: 61bb str r3, [r7, #24]
+ config_response[0] = GPS_DATA_REGISTER;
+ 80006c6: 69bb ldr r3, [r7, #24]
+ 80006c8: 22ff movs r2, #255 ; 0xff
+ 80006ca: 701a strb r2, [r3, #0]
+
+ // Recieve the CONFIG response
+ hal = HAL_I2C_Master_Receive(&hi2c1, GPS_DEVICE_ADDRESS | 0x01, config_response, message_length, HAL_MAX_DELAY);
+ 80006cc: 8c3b ldrh r3, [r7, #32]
+ 80006ce: f04f 32ff mov.w r2, #4294967295
+ 80006d2: 9200 str r2, [sp, #0]
+ 80006d4: 69ba ldr r2, [r7, #24]
+ 80006d6: 2185 movs r1, #133 ; 0x85
+ 80006d8: 4829 ldr r0, [pc, #164] ; (8000780 )
+ 80006da: f001 f9f7 bl 8001acc
+ 80006de: 4603 mov r3, r0
+ 80006e0: f887 3023 strb.w r3, [r7, #35] ; 0x23
+ if (hal != HAL_OK) {
+ 80006e4: f897 3023 ldrb.w r3, [r7, #35] ; 0x23
+ 80006e8: 2b00 cmp r3, #0
+ 80006ea: d009 beq.n 8000700
+ printf("CONFIG response went wrong!\r\n");
+ 80006ec: 4827 ldr r0, [pc, #156] ; (800078c )
+ 80006ee: f003 fcd5 bl 800409c
+ printf("Error code: %08lX\r\n", hi2c1.ErrorCode);
+ 80006f2: 4b23 ldr r3, [pc, #140] ; (8000780 )
+ 80006f4: 6c1b ldr r3, [r3, #64] ; 0x40
+ 80006f6: 4619 mov r1, r3
+ 80006f8: 4825 ldr r0, [pc, #148] ; (8000790 )
+ 80006fa: f003 fc49 bl 8003f90
+ 80006fe: e02e b.n 800075e
+ } else {
+ printf("Length: %d | Headers: %X %X |Class: %X | ID: %X | rest: %X %X %X %X %X %X\r\n", message_length, config_response[0], config_response[1], config_response[2], config_response[3], config_response[4], config_response[5], config_response[6], config_response[7], config_response[8], config_response[9]);
+ 8000700: 8c39 ldrh r1, [r7, #32]
+ 8000702: 69bb ldr r3, [r7, #24]
+ 8000704: 781b ldrb r3, [r3, #0]
+ 8000706: 469c mov ip, r3
+ 8000708: 69bb ldr r3, [r7, #24]
+ 800070a: 785b ldrb r3, [r3, #1]
+ 800070c: 469e mov lr, r3
+ 800070e: 69bb ldr r3, [r7, #24]
+ 8000710: 789b ldrb r3, [r3, #2]
+ 8000712: 461e mov r6, r3
+ 8000714: 69bb ldr r3, [r7, #24]
+ 8000716: 78db ldrb r3, [r3, #3]
+ 8000718: 60fb str r3, [r7, #12]
+ 800071a: 69bb ldr r3, [r7, #24]
+ 800071c: 791b ldrb r3, [r3, #4]
+ 800071e: 60bb str r3, [r7, #8]
+ 8000720: 69bb ldr r3, [r7, #24]
+ 8000722: 795b ldrb r3, [r3, #5]
+ 8000724: 607b str r3, [r7, #4]
+ 8000726: 69bb ldr r3, [r7, #24]
+ 8000728: 799b ldrb r3, [r3, #6]
+ 800072a: 603b str r3, [r7, #0]
+ 800072c: 69bb ldr r3, [r7, #24]
+ 800072e: 79db ldrb r3, [r3, #7]
+ 8000730: 4618 mov r0, r3
+ 8000732: 69bb ldr r3, [r7, #24]
+ 8000734: 7a1b ldrb r3, [r3, #8]
+ 8000736: 461a mov r2, r3
+ 8000738: 69bb ldr r3, [r7, #24]
+ 800073a: 7a5b ldrb r3, [r3, #9]
+ 800073c: 9307 str r3, [sp, #28]
+ 800073e: 9206 str r2, [sp, #24]
+ 8000740: 9005 str r0, [sp, #20]
+ 8000742: 683a ldr r2, [r7, #0]
+ 8000744: 9204 str r2, [sp, #16]
+ 8000746: 687a ldr r2, [r7, #4]
+ 8000748: 9203 str r2, [sp, #12]
+ 800074a: 68ba ldr r2, [r7, #8]
+ 800074c: 9202 str r2, [sp, #8]
+ 800074e: 68fb ldr r3, [r7, #12]
+ 8000750: 9301 str r3, [sp, #4]
+ 8000752: 9600 str r6, [sp, #0]
+ 8000754: 4673 mov r3, lr
+ 8000756: 4662 mov r2, ip
+ 8000758: 480e ldr r0, [pc, #56] ; (8000794 )
+ 800075a: f003 fc19 bl 8003f90
+ 800075e: 46d5 mov sp, sl
+ for (int i = 0; i < 2; i++) {
+ 8000760: 6a7b ldr r3, [r7, #36] ; 0x24
+ 8000762: 3301 adds r3, #1
+ 8000764: 627b str r3, [r7, #36] ; 0x24
+ 8000766: 6a7b ldr r3, [r7, #36] ; 0x24
+ 8000768: 2b01 cmp r3, #1
+ 800076a: f77f af60 ble.w 800062e
+ // see if response was a ACK message
+ }
+ }
+ }
+}
+ 800076e: bf00 nop
+ 8000770: bf00 nop
+ 8000772: 3728 adds r7, #40 ; 0x28
+ 8000774: 46bd mov sp, r7
+ 8000776: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+ 800077a: bf00 nop
+ 800077c: 08004fbc .word 0x08004fbc
+ 8000780: 200000b4 .word 0x200000b4
+ 8000784: 08004fd4 .word 0x08004fd4
+ 8000788: 08004ff0 .word 0x08004ff0
+ 800078c: 08005008 .word 0x08005008
+ 8000790: 08005028 .word 0x08005028
+ 8000794: 0800503c .word 0x0800503c
+
+08000798 :
+
+uint16_t UBX_GET_LENGTH() {
+ 8000798: b580 push {r7, lr}
+ 800079a: b086 sub sp, #24
+ 800079c: af04 add r7, sp, #16
+// HAL_StatusTypeDef hal;
+ // get the length of the messages
+ uint8_t ubx_length[2];
+ HAL_StatusTypeDef hal = HAL_I2C_Mem_Read(&hi2c1, GPS_DEVICE_ADDRESS | 0x01, GPS_DATA_LENGTH_HIGH, 1, ubx_length, sizeof(ubx_length), 100);
+ 800079e: 2364 movs r3, #100 ; 0x64
+ 80007a0: 9302 str r3, [sp, #8]
+ 80007a2: 2302 movs r3, #2
+ 80007a4: 9301 str r3, [sp, #4]
+ 80007a6: 1d3b adds r3, r7, #4
+ 80007a8: 9300 str r3, [sp, #0]
+ 80007aa: 2301 movs r3, #1
+ 80007ac: 22fd movs r2, #253 ; 0xfd
+ 80007ae: 2185 movs r1, #133 ; 0x85
+ 80007b0: 480e ldr r0, [pc, #56] ; (80007ec )
+ 80007b2: f001 fcb7 bl 8002124
+ 80007b6: 4603 mov r3, r0
+ 80007b8: 71fb strb r3, [r7, #7]
+ if (hal != HAL_OK) {
+ 80007ba: 79fb ldrb r3, [r7, #7]
+ 80007bc: 2b00 cmp r3, #0
+ 80007be: d002 beq.n 80007c6
+ printf("Read for length went wrong");
+ 80007c0: 480b ldr r0, [pc, #44] ; (80007f0 )
+ 80007c2: f003 fbe5 bl 8003f90
+ }
+
+ printf("High: %X | Low: %X\r\n",ubx_length[0], ubx_length[1]);
+ 80007c6: 793b ldrb r3, [r7, #4]
+ 80007c8: 4619 mov r1, r3
+ 80007ca: 797b ldrb r3, [r7, #5]
+ 80007cc: 461a mov r2, r3
+ 80007ce: 4809 ldr r0, [pc, #36] ; (80007f4 )
+ 80007d0: f003 fbde bl 8003f90
+ // return length as uint16_t
+ return ((ubx_length[0] << 8) | (ubx_length[1]));
+ 80007d4: 793b ldrb r3, [r7, #4]
+ 80007d6: 021b lsls r3, r3, #8
+ 80007d8: b21a sxth r2, r3
+ 80007da: 797b ldrb r3, [r7, #5]
+ 80007dc: b21b sxth r3, r3
+ 80007de: 4313 orrs r3, r2
+ 80007e0: b21b sxth r3, r3
+ 80007e2: b29b uxth r3, r3
+}
+ 80007e4: 4618 mov r0, r3
+ 80007e6: 3708 adds r7, #8
+ 80007e8: 46bd mov sp, r7
+ 80007ea: bd80 pop {r7, pc}
+ 80007ec: 200000b4 .word 0x200000b4
+ 80007f0: 08005088 .word 0x08005088
+ 80007f4: 080050a4 .word 0x080050a4
+
+080007f8 :
+
+void GPS_Initialization(void) {
+ 80007f8: b580 push {r7, lr}
+ 80007fa: b084 sub sp, #16
+ 80007fc: af02 add r7, sp, #8
+ HAL_StatusTypeDef hal;
+ hal = HAL_I2C_Master_Transmit(&hi2c1, GPS_DEVICE_ADDRESS, UBX_CFG_CFG, sizeof(UBX_CFG_CFG), HAL_MAX_DELAY);
+ 80007fe: f04f 33ff mov.w r3, #4294967295
+ 8000802: 9300 str r3, [sp, #0]
+ 8000804: 2315 movs r3, #21
+ 8000806: 4a10 ldr r2, [pc, #64] ; (8000848 )
+ 8000808: 2184 movs r1, #132 ; 0x84
+ 800080a: 4810 ldr r0, [pc, #64] ; (800084c )
+ 800080c: f001 f860 bl 80018d0
+ 8000810: 4603 mov r3, r0
+ 8000812: 71fb strb r3, [r7, #7]
+ if (hal != HAL_OK) {
+ 8000814: 79fb ldrb r3, [r7, #7]
+ 8000816: 2b00 cmp r3, #0
+ 8000818: d002 beq.n 8000820
+ // something went wrong with transmit (exit)
+ printf("UBX-CFG-CFG went wrong!\r\n");
+ 800081a: 480d ldr r0, [pc, #52] ; (8000850 )
+ 800081c: f003 fc3e bl 800409c
+// uint8_t test[] = "CONFIG reset transmit went wrong\r\n";
+// HAL_UART_Transmit(&huart1, test, sizeof(test), HAL_MAX_DELAY);
+ }
+ HAL_Delay(2000);
+ 8000820: f44f 60fa mov.w r0, #2000 ; 0x7d0
+ 8000824: f000 fc38 bl 8001098
+
+ printf("Starting MSG\r\n");
+ 8000828: 480a ldr r0, [pc, #40] ; (8000854 )
+ 800082a: f003 fc37 bl 800409c
+ CONFIG_Transmit(UBX_CFG_MSG, sizeof(UBX_CFG_MSG)/sizeof(UBX_CFG_MSG[0]));
+ 800082e: 2110 movs r1, #16
+ 8000830: 4809 ldr r0, [pc, #36] ; (8000858 )
+ 8000832: f7ff feed bl 8000610
+ HAL_Delay(1000);
+ 8000836: f44f 707a mov.w r0, #1000 ; 0x3e8
+ 800083a: f000 fc2d bl 8001098
+//// uint8_t test3[] = "rate CONFIG STARTS here\r\n";
+//// HAL_UART_Transmit(&huart1, test3, sizeof(test3), HAL_MAX_DELAY);
+// printf("Starting RATE\r\n");
+// CONFIG_Transmit(UBX_CFG_RATE, sizeof(UBX_CFG_RATE)/sizeof(UBX_CFG_RATE[0]));
+// HAL_Delay(1000);
+}
+ 800083e: bf00 nop
+ 8000840: 3708 adds r7, #8
+ 8000842: 46bd mov sp, r7
+ 8000844: bd80 pop {r7, pc}
+ 8000846: bf00 nop
+ 8000848: 20000010 .word 0x20000010
+ 800084c: 200000b4 .word 0x200000b4
+ 8000850: 080050bc .word 0x080050bc
+ 8000854: 080050d8 .word 0x080050d8
+ 8000858: 20000000 .word 0x20000000
+
+0800085c <__io_putchar>:
+#else
+#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
+#endif
+
+PUTCHAR_PROTOTYPE
+{
+ 800085c: b580 push {r7, lr}
+ 800085e: b082 sub sp, #8
+ 8000860: af00 add r7, sp, #0
+ 8000862: 6078 str r0, [r7, #4]
+ HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, HAL_MAX_DELAY);
+ 8000864: 1d39 adds r1, r7, #4
+ 8000866: f04f 33ff mov.w r3, #4294967295
+ 800086a: 2201 movs r2, #1
+ 800086c: 4803 ldr r0, [pc, #12] ; (800087c <__io_putchar+0x20>)
+ 800086e: f003 f987 bl 8003b80
+ return ch;
+ 8000872: 687b ldr r3, [r7, #4]
+}
+ 8000874: 4618 mov r0, r3
+ 8000876: 3708 adds r7, #8
+ 8000878: 46bd mov sp, r7
+ 800087a: bd80 pop {r7, pc}
+ 800087c: 20000108 .word 0x20000108
+
+08000880 :
+/**
+ * @brief The application entry point.
+ * @retval int
+ */
+int main(void)
+{
+ 8000880: b580 push {r7, lr}
+ 8000882: b094 sub sp, #80 ; 0x50
+ 8000884: af02 add r7, sp, #8
+ /* USER CODE END 1 */
+
+ /* MCU Configuration--------------------------------------------------------*/
+
+ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
+ HAL_Init();
+ 8000886: f000 fb98 bl 8000fba
+ /* USER CODE BEGIN Init */
+
+ /* USER CODE END Init */
+
+ /* Configure the system clock */
+ SystemClock_Config();
+ 800088a: f000 f883 bl 8000994
+ /* USER CODE BEGIN SysInit */
+
+ /* USER CODE END SysInit */
+
+ /* Initialize all configured peripherals */
+ MX_GPIO_Init();
+ 800088e: f000 f94b bl 8000b28
+ MX_I2C1_Init();
+ 8000892: f000 f8c7 bl 8000a24
+ MX_USART2_UART_Init();
+ 8000896: f000 f91d bl 8000ad4
+ MX_USART1_UART_Init();
+ 800089a: f000 f8f1 bl 8000a80
+ /* USER CODE BEGIN 2 */
+
+ // Setup GPS receiver with desired configurations
+ printf("Starting configurations\r\n");
+ 800089e: 4835 ldr r0, [pc, #212] ; (8000974 )
+ 80008a0: f003 fbfc bl 800409c
+ GPS_Initialization();
+ 80008a4: f7ff ffa8 bl 80007f8
+ printf("Configurations complete\r\n");
+ 80008a8: 4833 ldr r0, [pc, #204] ; (8000978 )
+ 80008aa: f003 fbf7 bl 800409c
+ /* USER CODE BEGIN WHILE */
+ while (1)
+ {
+ // set first element of buffer as the address of data stream register
+ // If GPS_BUFFER == 0xFF, then it means that there is no data for the GPS to send
+ GPS_BUFFER[0] = GPS_DATA_REGISTER;
+ 80008ae: 23ff movs r3, #255 ; 0xff
+ 80008b0: 773b strb r3, [r7, #28]
+
+ // Transmit to GPS, let it know I want data
+ hal = HAL_I2C_Master_Transmit(&hi2c1, GPS_DEVICE_ADDRESS, GPS_BUFFER, BUFFER_SIZE, HAL_MAX_DELAY);
+ 80008b2: f107 021c add.w r2, r7, #28
+ 80008b6: f04f 33ff mov.w r3, #4294967295
+ 80008ba: 9300 str r3, [sp, #0]
+ 80008bc: 2324 movs r3, #36 ; 0x24
+ 80008be: 2184 movs r1, #132 ; 0x84
+ 80008c0: 482e ldr r0, [pc, #184] ; (800097c )
+ 80008c2: f001 f805 bl 80018d0
+ 80008c6: 4603 mov r3, r0
+ 80008c8: f887 3047 strb.w r3, [r7, #71] ; 0x47
+ if ( hal != HAL_OK ) {
+ 80008cc: f897 3047 ldrb.w r3, [r7, #71] ; 0x47
+ 80008d0: 2b00 cmp r3, #0
+ 80008d2: d002 beq.n 80008da
+ printf("data transmit went wrong\r\n");
+ 80008d4: 482a ldr r0, [pc, #168] ; (8000980 )
+ 80008d6: f003 fbe1 bl 800409c
+ }
+
+ // if HAL_OK then receive data
+ // set bit zero on device address for read access
+ hal = HAL_I2C_Master_Receive(&hi2c1, GPS_DEVICE_ADDRESS | 0x01, GPS_BUFFER, BUFFER_SIZE, HAL_MAX_DELAY);
+ 80008da: f107 021c add.w r2, r7, #28
+ 80008de: f04f 33ff mov.w r3, #4294967295
+ 80008e2: 9300 str r3, [sp, #0]
+ 80008e4: 2324 movs r3, #36 ; 0x24
+ 80008e6: 2185 movs r1, #133 ; 0x85
+ 80008e8: 4824 ldr r0, [pc, #144] ; (800097c )
+ 80008ea: f001 f8ef bl 8001acc
+ 80008ee: 4603 mov r3, r0
+ 80008f0: f887 3047 strb.w r3, [r7, #71] ; 0x47
+ if ( hal != HAL_OK ) {
+ 80008f4: f897 3047 ldrb.w r3, [r7, #71] ; 0x47
+ 80008f8: 2b00 cmp r3, #0
+ 80008fa: d002 beq.n 8000902
+ printf("data receive went wrong\r\n");
+ 80008fc: 4821 ldr r0, [pc, #132] ; (8000984 )
+ 80008fe: f003 fbcd bl 800409c
+ }
+
+ // buffer[0] == 0xff when there is no data
+ if (GPS_BUFFER[0] != 0xff) {
+ 8000902: 7f3b ldrb r3, [r7, #28]
+ 8000904: 2bff cmp r3, #255 ; 0xff
+ 8000906: d02d beq.n 8000964
+
+ // call Checksum function to retrieve computed checksum of the buffer's payload
+ uint16_t computedChecksum = UBX_M8N_CHECKSUM(GPS_BUFFER, BUFFER_SIZE);
+ 8000908: f107 031c add.w r3, r7, #28
+ 800090c: 2124 movs r1, #36 ; 0x24
+ 800090e: 4618 mov r0, r3
+ 8000910: f7ff fdb8 bl 8000484
+ 8000914: 4603 mov r3, r0
+ 8000916: f8a7 3044 strh.w r3, [r7, #68] ; 0x44
+
+ // expected checksum value is the last 2 bytes of the buffer
+ uint16_t expectedChecksum = (GPS_BUFFER[BUFFER_SIZE - 2]<<8) | GPS_BUFFER[BUFFER_SIZE - 1];
+ 800091a: f897 303e ldrb.w r3, [r7, #62] ; 0x3e
+ 800091e: 021b lsls r3, r3, #8
+ 8000920: b21a sxth r2, r3
+ 8000922: f897 303f ldrb.w r3, [r7, #63] ; 0x3f
+ 8000926: b21b sxth r3, r3
+ 8000928: 4313 orrs r3, r2
+ 800092a: b21b sxth r3, r3
+ 800092c: f8a7 3042 strh.w r3, [r7, #66] ; 0x42
+
+ // if computed checksum = expected checksum, then data is valid
+ if (computedChecksum == expectedChecksum) {
+ 8000930: f8b7 2044 ldrh.w r2, [r7, #68] ; 0x44
+ 8000934: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42
+ 8000938: 429a cmp r2, r3
+ 800093a: d10f bne.n 800095c
+ UBX_M8N_NAV_POSLLH_Parsing(GPS_BUFFER, &data); // parses data
+ 800093c: 463a mov r2, r7
+ 800093e: f107 031c add.w r3, r7, #28
+ 8000942: 4611 mov r1, r2
+ 8000944: 4618 mov r0, r3
+ 8000946: f7ff fdca bl 80004de
+ HAL_UART_Transmit(&huart2, GPS_BUFFER, BUFFER_SIZE, HAL_MAX_DELAY); // transmit data to pc through UART (for testing)
+ 800094a: f107 011c add.w r1, r7, #28
+ 800094e: f04f 33ff mov.w r3, #4294967295
+ 8000952: 2224 movs r2, #36 ; 0x24
+ 8000954: 480c ldr r0, [pc, #48] ; (8000988 )
+ 8000956: f003 f913 bl 8003b80
+ 800095a: e006 b.n 800096a
+ } else {
+ // The data received from GPS is invalid
+ printf("The checksum is invalid!\r\n");
+ 800095c: 480b ldr r0, [pc, #44] ; (800098c )
+ 800095e: f003 fb9d bl 800409c
+ 8000962: e002 b.n 800096a
+ // uint8_t test[] = "The checksum is invalid!\r\n";
+ // HAL_UART_Transmit(&huart1, test, sizeof(test), HAL_MAX_DELAY);
+ }
+ } else {
+ // The GPS does not have data to send over
+ printf("There is no data!\r\n");
+ 8000964: 480a ldr r0, [pc, #40] ; (8000990 )
+ 8000966: f003 fb99 bl 800409c
+ }
+
+ HAL_Delay(500);
+ 800096a: f44f 70fa mov.w r0, #500 ; 0x1f4
+ 800096e: f000 fb93 bl 8001098
+ GPS_BUFFER[0] = GPS_DATA_REGISTER;
+ 8000972: e79c b.n 80008ae
+ 8000974: 080050e8 .word 0x080050e8
+ 8000978: 08005104 .word 0x08005104
+ 800097c: 200000b4 .word 0x200000b4
+ 8000980: 08005120 .word 0x08005120
+ 8000984: 0800513c .word 0x0800513c
+ 8000988: 20000150 .word 0x20000150
+ 800098c: 08005158 .word 0x08005158
+ 8000990: 08005174 .word 0x08005174
+
+08000994 :
+/**
+ * @brief System Clock Configuration
+ * @retval None
+ */
+void SystemClock_Config(void)
+{
+ 8000994: b580 push {r7, lr}
+ 8000996: b092 sub sp, #72 ; 0x48
+ 8000998: af00 add r7, sp, #0
+ RCC_OscInitTypeDef RCC_OscInitStruct = {0};
+ 800099a: f107 0314 add.w r3, r7, #20
+ 800099e: 2234 movs r2, #52 ; 0x34
+ 80009a0: 2100 movs r1, #0
+ 80009a2: 4618 mov r0, r3
+ 80009a4: f003 faec bl 8003f80
+ RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
+ 80009a8: 463b mov r3, r7
+ 80009aa: 2200 movs r2, #0
+ 80009ac: 601a str r2, [r3, #0]
+ 80009ae: 605a str r2, [r3, #4]
+ 80009b0: 609a str r2, [r3, #8]
+ 80009b2: 60da str r2, [r3, #12]
+ 80009b4: 611a str r2, [r3, #16]
+
+ /** Configure the main internal regulator output voltage
+ */
+ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
+ 80009b6: 4b1a ldr r3, [pc, #104] ; (8000a20 )
+ 80009b8: 681b ldr r3, [r3, #0]
+ 80009ba: f423 53c0 bic.w r3, r3, #6144 ; 0x1800
+ 80009be: 4a18 ldr r2, [pc, #96] ; (8000a20 )
+ 80009c0: f443 6300 orr.w r3, r3, #2048 ; 0x800
+ 80009c4: 6013 str r3, [r2, #0]
+
+ /** Initializes the RCC Oscillators according to the specified parameters
+ * in the RCC_OscInitTypeDef structure.
+ */
+ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI;
+ 80009c6: 2310 movs r3, #16
+ 80009c8: 617b str r3, [r7, #20]
+ RCC_OscInitStruct.MSIState = RCC_MSI_ON;
+ 80009ca: 2301 movs r3, #1
+ 80009cc: 62fb str r3, [r7, #44] ; 0x2c
+ RCC_OscInitStruct.MSICalibrationValue = 0;
+ 80009ce: 2300 movs r3, #0
+ 80009d0: 633b str r3, [r7, #48] ; 0x30
+ RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_5;
+ 80009d2: f44f 4320 mov.w r3, #40960 ; 0xa000
+ 80009d6: 637b str r3, [r7, #52] ; 0x34
+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
+ 80009d8: 2300 movs r3, #0
+ 80009da: 63bb str r3, [r7, #56] ; 0x38
+ if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
+ 80009dc: f107 0314 add.w r3, r7, #20
+ 80009e0: 4618 mov r0, r3
+ 80009e2: f002 fac9 bl 8002f78
+ 80009e6: 4603 mov r3, r0
+ 80009e8: 2b00 cmp r3, #0
+ 80009ea: d001 beq.n 80009f0
+ {
+ Error_Handler();
+ 80009ec: f000 f900 bl 8000bf0
+ }
+
+ /** Initializes the CPU, AHB and APB buses clocks
+ */
+ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
+ 80009f0: 230f movs r3, #15
+ 80009f2: 603b str r3, [r7, #0]
+ |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_MSI;
+ 80009f4: 2300 movs r3, #0
+ 80009f6: 607b str r3, [r7, #4]
+ RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
+ 80009f8: 2300 movs r3, #0
+ 80009fa: 60bb str r3, [r7, #8]
+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
+ 80009fc: 2300 movs r3, #0
+ 80009fe: 60fb str r3, [r7, #12]
+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
+ 8000a00: 2300 movs r3, #0
+ 8000a02: 613b str r3, [r7, #16]
+
+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
+ 8000a04: 463b mov r3, r7
+ 8000a06: 2100 movs r1, #0
+ 8000a08: 4618 mov r0, r3
+ 8000a0a: f002 fde5 bl 80035d8
+ 8000a0e: 4603 mov r3, r0
+ 8000a10: 2b00 cmp r3, #0
+ 8000a12: d001 beq.n 8000a18
+ {
+ Error_Handler();
+ 8000a14: f000 f8ec bl 8000bf0
+ }
+}
+ 8000a18: bf00 nop
+ 8000a1a: 3748 adds r7, #72 ; 0x48
+ 8000a1c: 46bd mov sp, r7
+ 8000a1e: bd80 pop {r7, pc}
+ 8000a20: 40007000 .word 0x40007000
+
+08000a24 :
+ * @brief I2C1 Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_I2C1_Init(void)
+{
+ 8000a24: b580 push {r7, lr}
+ 8000a26: af00 add r7, sp, #0
+ /* USER CODE END I2C1_Init 0 */
+
+ /* USER CODE BEGIN I2C1_Init 1 */
+
+ /* USER CODE END I2C1_Init 1 */
+ hi2c1.Instance = I2C1;
+ 8000a28: 4b12 ldr r3, [pc, #72] ; (8000a74 )
+ 8000a2a: 4a13 ldr r2, [pc, #76] ; (8000a78 )
+ 8000a2c: 601a str r2, [r3, #0]
+ hi2c1.Init.ClockSpeed = 100000;
+ 8000a2e: 4b11 ldr r3, [pc, #68] ; (8000a74 )
+ 8000a30: 4a12 ldr r2, [pc, #72] ; (8000a7c )
+ 8000a32: 605a str r2, [r3, #4]
+ hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
+ 8000a34: 4b0f ldr r3, [pc, #60] ; (8000a74 )
+ 8000a36: 2200 movs r2, #0
+ 8000a38: 609a str r2, [r3, #8]
+ hi2c1.Init.OwnAddress1 = 0;
+ 8000a3a: 4b0e ldr r3, [pc, #56] ; (8000a74 )
+ 8000a3c: 2200 movs r2, #0
+ 8000a3e: 60da str r2, [r3, #12]
+ hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
+ 8000a40: 4b0c ldr r3, [pc, #48] ; (8000a74 )
+ 8000a42: f44f 4280 mov.w r2, #16384 ; 0x4000
+ 8000a46: 611a str r2, [r3, #16]
+ hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
+ 8000a48: 4b0a ldr r3, [pc, #40] ; (8000a74 )
+ 8000a4a: 2200 movs r2, #0
+ 8000a4c: 615a str r2, [r3, #20]
+ hi2c1.Init.OwnAddress2 = 0;
+ 8000a4e: 4b09 ldr r3, [pc, #36] ; (8000a74 )
+ 8000a50: 2200 movs r2, #0
+ 8000a52: 619a str r2, [r3, #24]
+ hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
+ 8000a54: 4b07 ldr r3, [pc, #28] ; (8000a74 )
+ 8000a56: 2200 movs r2, #0
+ 8000a58: 61da str r2, [r3, #28]
+ hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
+ 8000a5a: 4b06 ldr r3, [pc, #24] ; (8000a74 )
+ 8000a5c: 2200 movs r2, #0
+ 8000a5e: 621a str r2, [r3, #32]
+ if (HAL_I2C_Init(&hi2c1) != HAL_OK)
+ 8000a60: 4804 ldr r0, [pc, #16] ; (8000a74 )
+ 8000a62: f000 fdf1 bl 8001648
+ 8000a66: 4603 mov r3, r0
+ 8000a68: 2b00 cmp r3, #0
+ 8000a6a: d001 beq.n 8000a70
+ {
+ Error_Handler();
+ 8000a6c: f000 f8c0 bl 8000bf0
+ }
+ /* USER CODE BEGIN I2C1_Init 2 */
+
+ /* USER CODE END I2C1_Init 2 */
+
+}
+ 8000a70: bf00 nop
+ 8000a72: bd80 pop {r7, pc}
+ 8000a74: 200000b4 .word 0x200000b4
+ 8000a78: 40005400 .word 0x40005400
+ 8000a7c: 000186a0 .word 0x000186a0
+
+08000a80 :
+ * @brief USART1 Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_USART1_UART_Init(void)
+{
+ 8000a80: b580 push {r7, lr}
+ 8000a82: af00 add r7, sp, #0
+ /* USER CODE END USART1_Init 0 */
+
+ /* USER CODE BEGIN USART1_Init 1 */
+
+ /* USER CODE END USART1_Init 1 */
+ huart1.Instance = USART1;
+ 8000a84: 4b11 ldr r3, [pc, #68] ; (8000acc )
+ 8000a86: 4a12 ldr r2, [pc, #72] ; (8000ad0 )
+ 8000a88: 601a str r2, [r3, #0]
+ huart1.Init.BaudRate = 9600;
+ 8000a8a: 4b10 ldr r3, [pc, #64] ; (8000acc )
+ 8000a8c: f44f 5216 mov.w r2, #9600 ; 0x2580
+ 8000a90: 605a str r2, [r3, #4]
+ huart1.Init.WordLength = UART_WORDLENGTH_8B;
+ 8000a92: 4b0e ldr r3, [pc, #56] ; (8000acc )
+ 8000a94: 2200 movs r2, #0
+ 8000a96: 609a str r2, [r3, #8]
+ huart1.Init.StopBits = UART_STOPBITS_1;
+ 8000a98: 4b0c ldr r3, [pc, #48] ; (8000acc )
+ 8000a9a: 2200 movs r2, #0
+ 8000a9c: 60da str r2, [r3, #12]
+ huart1.Init.Parity = UART_PARITY_NONE;
+ 8000a9e: 4b0b ldr r3, [pc, #44] ; (8000acc )
+ 8000aa0: 2200 movs r2, #0
+ 8000aa2: 611a str r2, [r3, #16]
+ huart1.Init.Mode = UART_MODE_TX;
+ 8000aa4: 4b09 ldr r3, [pc, #36] ; (8000acc )
+ 8000aa6: 2208 movs r2, #8
+ 8000aa8: 615a str r2, [r3, #20]
+ huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ 8000aaa: 4b08 ldr r3, [pc, #32] ; (8000acc )
+ 8000aac: 2200 movs r2, #0
+ 8000aae: 619a str r2, [r3, #24]
+ huart1.Init.OverSampling = UART_OVERSAMPLING_16;
+ 8000ab0: 4b06 ldr r3, [pc, #24] ; (8000acc )
+ 8000ab2: 2200 movs r2, #0
+ 8000ab4: 61da str r2, [r3, #28]
+ if (HAL_UART_Init(&huart1) != HAL_OK)
+ 8000ab6: 4805 ldr r0, [pc, #20] ; (8000acc )
+ 8000ab8: f003 f812 bl 8003ae0
+ 8000abc: 4603 mov r3, r0
+ 8000abe: 2b00 cmp r3, #0
+ 8000ac0: d001 beq.n 8000ac6
+ {
+ Error_Handler();
+ 8000ac2: f000 f895 bl 8000bf0
+ }
+ /* USER CODE BEGIN USART1_Init 2 */
+
+ /* USER CODE END USART1_Init 2 */
+
+}
+ 8000ac6: bf00 nop
+ 8000ac8: bd80 pop {r7, pc}
+ 8000aca: bf00 nop
+ 8000acc: 20000108 .word 0x20000108
+ 8000ad0: 40013800 .word 0x40013800
+
+08000ad4 :
+ * @brief USART2 Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_USART2_UART_Init(void)
+{
+ 8000ad4: b580 push {r7, lr}
+ 8000ad6: af00 add r7, sp, #0
+ /* USER CODE END USART2_Init 0 */
+
+ /* USER CODE BEGIN USART2_Init 1 */
+
+ /* USER CODE END USART2_Init 1 */
+ huart2.Instance = USART2;
+ 8000ad8: 4b11 ldr r3, [pc, #68] ; (8000b20 )
+ 8000ada: 4a12 ldr r2, [pc, #72] ; (8000b24 )
+ 8000adc: 601a str r2, [r3, #0]
+ huart2.Init.BaudRate = 9600;
+ 8000ade: 4b10 ldr r3, [pc, #64] ; (8000b20 )
+ 8000ae0: f44f 5216 mov.w r2, #9600 ; 0x2580
+ 8000ae4: 605a str r2, [r3, #4]
+ huart2.Init.WordLength = UART_WORDLENGTH_8B;
+ 8000ae6: 4b0e ldr r3, [pc, #56] ; (8000b20 )
+ 8000ae8: 2200 movs r2, #0
+ 8000aea: 609a str r2, [r3, #8]
+ huart2.Init.StopBits = UART_STOPBITS_1;
+ 8000aec: 4b0c ldr r3, [pc, #48] ; (8000b20 )
+ 8000aee: 2200 movs r2, #0
+ 8000af0: 60da str r2, [r3, #12]
+ huart2.Init.Parity = UART_PARITY_NONE;
+ 8000af2: 4b0b ldr r3, [pc, #44] ; (8000b20 )
+ 8000af4: 2200 movs r2, #0
+ 8000af6: 611a str r2, [r3, #16]
+ huart2.Init.Mode = UART_MODE_TX_RX;
+ 8000af8: 4b09 ldr r3, [pc, #36] ; (8000b20 )
+ 8000afa: 220c movs r2, #12
+ 8000afc: 615a str r2, [r3, #20]
+ huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+ 8000afe: 4b08 ldr r3, [pc, #32] ; (8000b20 )
+ 8000b00: 2200 movs r2, #0
+ 8000b02: 619a str r2, [r3, #24]
+ huart2.Init.OverSampling = UART_OVERSAMPLING_16;
+ 8000b04: 4b06 ldr r3, [pc, #24] ; (8000b20 )
+ 8000b06: 2200 movs r2, #0
+ 8000b08: 61da str r2, [r3, #28]
+ if (HAL_UART_Init(&huart2) != HAL_OK)
+ 8000b0a: 4805 ldr r0, [pc, #20] ; (8000b20 )
+ 8000b0c: f002 ffe8 bl 8003ae0
+ 8000b10: 4603 mov r3, r0
+ 8000b12: 2b00 cmp r3, #0
+ 8000b14: d001 beq.n 8000b1a
+ {
+ Error_Handler();
+ 8000b16: f000 f86b bl 8000bf0
+ }
+ /* USER CODE BEGIN USART2_Init 2 */
+
+ /* USER CODE END USART2_Init 2 */
+
+}
+ 8000b1a: bf00 nop
+ 8000b1c: bd80 pop {r7, pc}
+ 8000b1e: bf00 nop
+ 8000b20: 20000150 .word 0x20000150
+ 8000b24: 40004400 .word 0x40004400
+
+08000b28 :
+ * @brief GPIO Initialization Function
+ * @param None
+ * @retval None
+ */
+static void MX_GPIO_Init(void)
+{
+ 8000b28: b580 push {r7, lr}
+ 8000b2a: b088 sub sp, #32
+ 8000b2c: af00 add r7, sp, #0
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ 8000b2e: f107 030c add.w r3, r7, #12
+ 8000b32: 2200 movs r2, #0
+ 8000b34: 601a str r2, [r3, #0]
+ 8000b36: 605a str r2, [r3, #4]
+ 8000b38: 609a str r2, [r3, #8]
+ 8000b3a: 60da str r2, [r3, #12]
+ 8000b3c: 611a str r2, [r3, #16]
+/* USER CODE BEGIN MX_GPIO_Init_1 */
+/* USER CODE END MX_GPIO_Init_1 */
+
+ /* GPIO Ports Clock Enable */
+ __HAL_RCC_GPIOC_CLK_ENABLE();
+ 8000b3e: 4b1f ldr r3, [pc, #124] ; (8000bbc )
+ 8000b40: 69db ldr r3, [r3, #28]
+ 8000b42: 4a1e ldr r2, [pc, #120] ; (8000bbc )
+ 8000b44: f043 0304 orr.w r3, r3, #4
+ 8000b48: 61d3 str r3, [r2, #28]
+ 8000b4a: 4b1c ldr r3, [pc, #112] ; (8000bbc )
+ 8000b4c: 69db ldr r3, [r3, #28]
+ 8000b4e: f003 0304 and.w r3, r3, #4
+ 8000b52: 60bb str r3, [r7, #8]
+ 8000b54: 68bb ldr r3, [r7, #8]
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ 8000b56: 4b19 ldr r3, [pc, #100] ; (8000bbc )
+ 8000b58: 69db ldr r3, [r3, #28]
+ 8000b5a: 4a18 ldr r2, [pc, #96] ; (8000bbc )
+ 8000b5c: f043 0301 orr.w r3, r3, #1
+ 8000b60: 61d3 str r3, [r2, #28]
+ 8000b62: 4b16 ldr r3, [pc, #88] ; (8000bbc )
+ 8000b64: 69db ldr r3, [r3, #28]
+ 8000b66: f003 0301 and.w r3, r3, #1
+ 8000b6a: 607b str r3, [r7, #4]
+ 8000b6c: 687b ldr r3, [r7, #4]
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+ 8000b6e: 4b13 ldr r3, [pc, #76] ; (8000bbc )
+ 8000b70: 69db ldr r3, [r3, #28]
+ 8000b72: 4a12 ldr r2, [pc, #72] ; (8000bbc )
+ 8000b74: f043 0302 orr.w r3, r3, #2
+ 8000b78: 61d3 str r3, [r2, #28]
+ 8000b7a: 4b10 ldr r3, [pc, #64] ; (8000bbc )
+ 8000b7c: 69db ldr r3, [r3, #28]
+ 8000b7e: f003 0302 and.w r3, r3, #2
+ 8000b82: 603b str r3, [r7, #0]
+ 8000b84: 683b ldr r3, [r7, #0]
+
+ /*Configure GPIO pin : B1_Pin */
+ GPIO_InitStruct.Pin = B1_Pin;
+ 8000b86: f44f 5300 mov.w r3, #8192 ; 0x2000
+ 8000b8a: 60fb str r3, [r7, #12]
+ GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
+ 8000b8c: f44f 1304 mov.w r3, #2162688 ; 0x210000
+ 8000b90: 613b str r3, [r7, #16]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8000b92: 2300 movs r3, #0
+ 8000b94: 617b str r3, [r7, #20]
+ HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
+ 8000b96: f107 030c add.w r3, r7, #12
+ 8000b9a: 4619 mov r1, r3
+ 8000b9c: 4808 ldr r0, [pc, #32] ; (8000bc0 )
+ 8000b9e: f000 fbab bl 80012f8
+
+ /* EXTI interrupt init*/
+ HAL_NVIC_SetPriority(EXTI15_10_IRQn, 0, 0);
+ 8000ba2: 2200 movs r2, #0
+ 8000ba4: 2100 movs r1, #0
+ 8000ba6: 2028 movs r0, #40 ; 0x28
+ 8000ba8: f000 fb6f bl 800128a
+ HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
+ 8000bac: 2028 movs r0, #40 ; 0x28
+ 8000bae: f000 fb88 bl 80012c2
+
+/* USER CODE BEGIN MX_GPIO_Init_2 */
+/* USER CODE END MX_GPIO_Init_2 */
+}
+ 8000bb2: bf00 nop
+ 8000bb4: 3720 adds r7, #32
+ 8000bb6: 46bd mov sp, r7
+ 8000bb8: bd80 pop {r7, pc}
+ 8000bba: bf00 nop
+ 8000bbc: 40023800 .word 0x40023800
+ 8000bc0: 40020800 .word 0x40020800
+
+08000bc4 :
+
+/* USER CODE BEGIN 4 */
+void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
+{
+ 8000bc4: b480 push {r7}
+ 8000bc6: b083 sub sp, #12
+ 8000bc8: af00 add r7, sp, #0
+ 8000bca: 4603 mov r3, r0
+ 8000bcc: 80fb strh r3, [r7, #6]
+ if(GPIO_Pin == B1_Pin) {
+ 8000bce: 88fb ldrh r3, [r7, #6]
+ 8000bd0: f5b3 5f00 cmp.w r3, #8192 ; 0x2000
+ 8000bd4: d103 bne.n 8000bde
+ GPS_FLAG = 1;
+ 8000bd6: 4b05 ldr r3, [pc, #20] ; (8000bec )
+ 8000bd8: 2201 movs r2, #1
+ 8000bda: 701a strb r2, [r3, #0]
+ } else {
+ __NOP();
+ }
+}
+ 8000bdc: e000 b.n 8000be0
+ __NOP();
+ 8000bde: bf00 nop
+}
+ 8000be0: bf00 nop
+ 8000be2: 370c adds r7, #12
+ 8000be4: 46bd mov sp, r7
+ 8000be6: bc80 pop {r7}
+ 8000be8: 4770 bx lr
+ 8000bea: bf00 nop
+ 8000bec: 20000198 .word 0x20000198
+
+08000bf0 :
+/**
+ * @brief This function is executed in case of error occurrence.
+ * @retval None
+ */
+void Error_Handler(void)
+{
+ 8000bf0: b480 push {r7}
+ 8000bf2: af00 add r7, sp, #0
+ \details Disables IRQ interrupts by setting the I-bit in the CPSR.
+ Can only be executed in Privileged modes.
+ */
+__STATIC_FORCEINLINE void __disable_irq(void)
+{
+ __ASM volatile ("cpsid i" : : : "memory");
+ 8000bf4: b672 cpsid i
+}
+ 8000bf6: bf00 nop
+ /* USER CODE BEGIN Error_Handler_Debug */
+ /* User can add his own implementation to report the HAL error return state */
+ __disable_irq();
+ while (1)
+ 8000bf8: e7fe b.n 8000bf8
+ ...
+
+08000bfc :
+/* USER CODE END 0 */
+/**
+ * Initializes the Global MSP.
+ */
+void HAL_MspInit(void)
+{
+ 8000bfc: b480 push {r7}
+ 8000bfe: b085 sub sp, #20
+ 8000c00: af00 add r7, sp, #0
+ /* USER CODE BEGIN MspInit 0 */
+
+ /* USER CODE END MspInit 0 */
+
+ __HAL_RCC_COMP_CLK_ENABLE();
+ 8000c02: 4b14 ldr r3, [pc, #80] ; (8000c54 )
+ 8000c04: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000c06: 4a13 ldr r2, [pc, #76] ; (8000c54 )
+ 8000c08: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000
+ 8000c0c: 6253 str r3, [r2, #36] ; 0x24
+ 8000c0e: 4b11 ldr r3, [pc, #68] ; (8000c54 )
+ 8000c10: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000c12: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000
+ 8000c16: 60fb str r3, [r7, #12]
+ 8000c18: 68fb ldr r3, [r7, #12]
+ __HAL_RCC_SYSCFG_CLK_ENABLE();
+ 8000c1a: 4b0e ldr r3, [pc, #56] ; (8000c54 )
+ 8000c1c: 6a1b ldr r3, [r3, #32]
+ 8000c1e: 4a0d ldr r2, [pc, #52] ; (8000c54 )
+ 8000c20: f043 0301 orr.w r3, r3, #1
+ 8000c24: 6213 str r3, [r2, #32]
+ 8000c26: 4b0b ldr r3, [pc, #44] ; (8000c54 )
+ 8000c28: 6a1b ldr r3, [r3, #32]
+ 8000c2a: f003 0301 and.w r3, r3, #1
+ 8000c2e: 60bb str r3, [r7, #8]
+ 8000c30: 68bb ldr r3, [r7, #8]
+ __HAL_RCC_PWR_CLK_ENABLE();
+ 8000c32: 4b08 ldr r3, [pc, #32] ; (8000c54 )
+ 8000c34: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000c36: 4a07 ldr r2, [pc, #28] ; (8000c54 )
+ 8000c38: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000
+ 8000c3c: 6253 str r3, [r2, #36] ; 0x24
+ 8000c3e: 4b05 ldr r3, [pc, #20] ; (8000c54 )
+ 8000c40: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000c42: f003 5380 and.w r3, r3, #268435456 ; 0x10000000
+ 8000c46: 607b str r3, [r7, #4]
+ 8000c48: 687b ldr r3, [r7, #4]
+ /* System interrupt init*/
+
+ /* USER CODE BEGIN MspInit 1 */
+
+ /* USER CODE END MspInit 1 */
+}
+ 8000c4a: bf00 nop
+ 8000c4c: 3714 adds r7, #20
+ 8000c4e: 46bd mov sp, r7
+ 8000c50: bc80 pop {r7}
+ 8000c52: 4770 bx lr
+ 8000c54: 40023800 .word 0x40023800
+
+08000c58 :
+* This function configures the hardware resources used in this example
+* @param hi2c: I2C handle pointer
+* @retval None
+*/
+void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
+{
+ 8000c58: b580 push {r7, lr}
+ 8000c5a: b08a sub sp, #40 ; 0x28
+ 8000c5c: af00 add r7, sp, #0
+ 8000c5e: 6078 str r0, [r7, #4]
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ 8000c60: f107 0314 add.w r3, r7, #20
+ 8000c64: 2200 movs r2, #0
+ 8000c66: 601a str r2, [r3, #0]
+ 8000c68: 605a str r2, [r3, #4]
+ 8000c6a: 609a str r2, [r3, #8]
+ 8000c6c: 60da str r2, [r3, #12]
+ 8000c6e: 611a str r2, [r3, #16]
+ if(hi2c->Instance==I2C1)
+ 8000c70: 687b ldr r3, [r7, #4]
+ 8000c72: 681b ldr r3, [r3, #0]
+ 8000c74: 4a17 ldr r2, [pc, #92] ; (8000cd4 )
+ 8000c76: 4293 cmp r3, r2
+ 8000c78: d128 bne.n 8000ccc
+ {
+ /* USER CODE BEGIN I2C1_MspInit 0 */
+
+ /* USER CODE END I2C1_MspInit 0 */
+
+ __HAL_RCC_GPIOB_CLK_ENABLE();
+ 8000c7a: 4b17 ldr r3, [pc, #92] ; (8000cd8 )
+ 8000c7c: 69db ldr r3, [r3, #28]
+ 8000c7e: 4a16 ldr r2, [pc, #88] ; (8000cd8 )
+ 8000c80: f043 0302 orr.w r3, r3, #2
+ 8000c84: 61d3 str r3, [r2, #28]
+ 8000c86: 4b14 ldr r3, [pc, #80] ; (8000cd8 )
+ 8000c88: 69db ldr r3, [r3, #28]
+ 8000c8a: f003 0302 and.w r3, r3, #2
+ 8000c8e: 613b str r3, [r7, #16]
+ 8000c90: 693b ldr r3, [r7, #16]
+ /**I2C1 GPIO Configuration
+ PB8 ------> I2C1_SCL
+ PB9 ------> I2C1_SDA
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
+ 8000c92: f44f 7340 mov.w r3, #768 ; 0x300
+ 8000c96: 617b str r3, [r7, #20]
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
+ 8000c98: 2312 movs r3, #18
+ 8000c9a: 61bb str r3, [r7, #24]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8000c9c: 2300 movs r3, #0
+ 8000c9e: 61fb str r3, [r7, #28]
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+ 8000ca0: 2303 movs r3, #3
+ 8000ca2: 623b str r3, [r7, #32]
+ GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
+ 8000ca4: 2304 movs r3, #4
+ 8000ca6: 627b str r3, [r7, #36] ; 0x24
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+ 8000ca8: f107 0314 add.w r3, r7, #20
+ 8000cac: 4619 mov r1, r3
+ 8000cae: 480b ldr r0, [pc, #44] ; (8000cdc )
+ 8000cb0: f000 fb22 bl 80012f8
+
+ /* Peripheral clock enable */
+ __HAL_RCC_I2C1_CLK_ENABLE();
+ 8000cb4: 4b08 ldr r3, [pc, #32] ; (8000cd8 )
+ 8000cb6: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000cb8: 4a07 ldr r2, [pc, #28] ; (8000cd8 )
+ 8000cba: f443 1300 orr.w r3, r3, #2097152 ; 0x200000
+ 8000cbe: 6253 str r3, [r2, #36] ; 0x24
+ 8000cc0: 4b05 ldr r3, [pc, #20] ; (8000cd8 )
+ 8000cc2: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000cc4: f403 1300 and.w r3, r3, #2097152 ; 0x200000
+ 8000cc8: 60fb str r3, [r7, #12]
+ 8000cca: 68fb ldr r3, [r7, #12]
+ /* USER CODE BEGIN I2C1_MspInit 1 */
+
+ /* USER CODE END I2C1_MspInit 1 */
+ }
+
+}
+ 8000ccc: bf00 nop
+ 8000cce: 3728 adds r7, #40 ; 0x28
+ 8000cd0: 46bd mov sp, r7
+ 8000cd2: bd80 pop {r7, pc}
+ 8000cd4: 40005400 .word 0x40005400
+ 8000cd8: 40023800 .word 0x40023800
+ 8000cdc: 40020400 .word 0x40020400
+
+08000ce0 :
+* This function configures the hardware resources used in this example
+* @param huart: UART handle pointer
+* @retval None
+*/
+void HAL_UART_MspInit(UART_HandleTypeDef* huart)
+{
+ 8000ce0: b580 push {r7, lr}
+ 8000ce2: b08c sub sp, #48 ; 0x30
+ 8000ce4: af00 add r7, sp, #0
+ 8000ce6: 6078 str r0, [r7, #4]
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+ 8000ce8: f107 031c add.w r3, r7, #28
+ 8000cec: 2200 movs r2, #0
+ 8000cee: 601a str r2, [r3, #0]
+ 8000cf0: 605a str r2, [r3, #4]
+ 8000cf2: 609a str r2, [r3, #8]
+ 8000cf4: 60da str r2, [r3, #12]
+ 8000cf6: 611a str r2, [r3, #16]
+ if(huart->Instance==USART1)
+ 8000cf8: 687b ldr r3, [r7, #4]
+ 8000cfa: 681b ldr r3, [r3, #0]
+ 8000cfc: 4a2e ldr r2, [pc, #184] ; (8000db8 )
+ 8000cfe: 4293 cmp r3, r2
+ 8000d00: d129 bne.n 8000d56
+ {
+ /* USER CODE BEGIN USART1_MspInit 0 */
+
+ /* USER CODE END USART1_MspInit 0 */
+ /* Peripheral clock enable */
+ __HAL_RCC_USART1_CLK_ENABLE();
+ 8000d02: 4b2e ldr r3, [pc, #184] ; (8000dbc )
+ 8000d04: 6a1b ldr r3, [r3, #32]
+ 8000d06: 4a2d ldr r2, [pc, #180] ; (8000dbc )
+ 8000d08: f443 4380 orr.w r3, r3, #16384 ; 0x4000
+ 8000d0c: 6213 str r3, [r2, #32]
+ 8000d0e: 4b2b ldr r3, [pc, #172] ; (8000dbc )
+ 8000d10: 6a1b ldr r3, [r3, #32]
+ 8000d12: f403 4380 and.w r3, r3, #16384 ; 0x4000
+ 8000d16: 61bb str r3, [r7, #24]
+ 8000d18: 69bb ldr r3, [r7, #24]
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ 8000d1a: 4b28 ldr r3, [pc, #160] ; (8000dbc )
+ 8000d1c: 69db ldr r3, [r3, #28]
+ 8000d1e: 4a27 ldr r2, [pc, #156] ; (8000dbc )
+ 8000d20: f043 0301 orr.w r3, r3, #1
+ 8000d24: 61d3 str r3, [r2, #28]
+ 8000d26: 4b25 ldr r3, [pc, #148] ; (8000dbc )
+ 8000d28: 69db ldr r3, [r3, #28]
+ 8000d2a: f003 0301 and.w r3, r3, #1
+ 8000d2e: 617b str r3, [r7, #20]
+ 8000d30: 697b ldr r3, [r7, #20]
+ /**USART1 GPIO Configuration
+ PA9 ------> USART1_TX
+ PA10 ------> USART1_RX
+ */
+ GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
+ 8000d32: f44f 63c0 mov.w r3, #1536 ; 0x600
+ 8000d36: 61fb str r3, [r7, #28]
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ 8000d38: 2302 movs r3, #2
+ 8000d3a: 623b str r3, [r7, #32]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8000d3c: 2300 movs r3, #0
+ 8000d3e: 627b str r3, [r7, #36] ; 0x24
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+ 8000d40: 2303 movs r3, #3
+ 8000d42: 62bb str r3, [r7, #40] ; 0x28
+ GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
+ 8000d44: 2307 movs r3, #7
+ 8000d46: 62fb str r3, [r7, #44] ; 0x2c
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ 8000d48: f107 031c add.w r3, r7, #28
+ 8000d4c: 4619 mov r1, r3
+ 8000d4e: 481c ldr r0, [pc, #112] ; (8000dc0 )
+ 8000d50: f000 fad2 bl 80012f8
+ /* USER CODE BEGIN USART2_MspInit 1 */
+
+ /* USER CODE END USART2_MspInit 1 */
+ }
+
+}
+ 8000d54: e02c b.n 8000db0
+ else if(huart->Instance==USART2)
+ 8000d56: 687b ldr r3, [r7, #4]
+ 8000d58: 681b ldr r3, [r3, #0]
+ 8000d5a: 4a1a ldr r2, [pc, #104] ; (8000dc4 )
+ 8000d5c: 4293 cmp r3, r2
+ 8000d5e: d127 bne.n 8000db0
+ __HAL_RCC_USART2_CLK_ENABLE();
+ 8000d60: 4b16 ldr r3, [pc, #88] ; (8000dbc )
+ 8000d62: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000d64: 4a15 ldr r2, [pc, #84] ; (8000dbc )
+ 8000d66: f443 3300 orr.w r3, r3, #131072 ; 0x20000
+ 8000d6a: 6253 str r3, [r2, #36] ; 0x24
+ 8000d6c: 4b13 ldr r3, [pc, #76] ; (8000dbc )
+ 8000d6e: 6a5b ldr r3, [r3, #36] ; 0x24
+ 8000d70: f403 3300 and.w r3, r3, #131072 ; 0x20000
+ 8000d74: 613b str r3, [r7, #16]
+ 8000d76: 693b ldr r3, [r7, #16]
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ 8000d78: 4b10 ldr r3, [pc, #64] ; (8000dbc )
+ 8000d7a: 69db ldr r3, [r3, #28]
+ 8000d7c: 4a0f ldr r2, [pc, #60] ; (8000dbc )
+ 8000d7e: f043 0301 orr.w r3, r3, #1
+ 8000d82: 61d3 str r3, [r2, #28]
+ 8000d84: 4b0d ldr r3, [pc, #52] ; (8000dbc )
+ 8000d86: 69db ldr r3, [r3, #28]
+ 8000d88: f003 0301 and.w r3, r3, #1
+ 8000d8c: 60fb str r3, [r7, #12]
+ 8000d8e: 68fb ldr r3, [r7, #12]
+ GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3;
+ 8000d90: 230c movs r3, #12
+ 8000d92: 61fb str r3, [r7, #28]
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ 8000d94: 2302 movs r3, #2
+ 8000d96: 623b str r3, [r7, #32]
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ 8000d98: 2300 movs r3, #0
+ 8000d9a: 627b str r3, [r7, #36] ; 0x24
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+ 8000d9c: 2303 movs r3, #3
+ 8000d9e: 62bb str r3, [r7, #40] ; 0x28
+ GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
+ 8000da0: 2307 movs r3, #7
+ 8000da2: 62fb str r3, [r7, #44] ; 0x2c
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ 8000da4: f107 031c add.w r3, r7, #28
+ 8000da8: 4619 mov r1, r3
+ 8000daa: 4805 ldr r0, [pc, #20] ; (8000dc0 )
+ 8000dac: f000 faa4 bl 80012f8
+}
+ 8000db0: bf00 nop
+ 8000db2: 3730 adds r7, #48 ; 0x30
+ 8000db4: 46bd mov sp, r7
+ 8000db6: bd80 pop {r7, pc}
+ 8000db8: 40013800 .word 0x40013800
+ 8000dbc: 40023800 .word 0x40023800
+ 8000dc0: 40020000 .word 0x40020000
+ 8000dc4: 40004400 .word 0x40004400
+
+08000dc8 :
+/******************************************************************************/
+/**
+ * @brief This function handles Non maskable interrupt.
+ */
+void NMI_Handler(void)
+{
+ 8000dc8: b480 push {r7}
+ 8000dca: af00 add r7, sp, #0
+ /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
+
+ /* USER CODE END NonMaskableInt_IRQn 0 */
+ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
+ while (1)
+ 8000dcc: e7fe b.n 8000dcc
+
+08000dce :
+
+/**
+ * @brief This function handles Hard fault interrupt.
+ */
+void HardFault_Handler(void)
+{
+ 8000dce: b480 push {r7}
+ 8000dd0: af00 add r7, sp, #0
+ /* USER CODE BEGIN HardFault_IRQn 0 */
+
+ /* USER CODE END HardFault_IRQn 0 */
+ while (1)
+ 8000dd2: e7fe b.n 8000dd2
+
+08000dd4 :
+
+/**
+ * @brief This function handles Memory management fault.
+ */
+void MemManage_Handler(void)
+{
+ 8000dd4: b480 push {r7}
+ 8000dd6: af00 add r7, sp, #0
+ /* USER CODE BEGIN MemoryManagement_IRQn 0 */
+
+ /* USER CODE END MemoryManagement_IRQn 0 */
+ while (1)
+ 8000dd8: e7fe b.n 8000dd8
+
+08000dda :
+
+/**
+ * @brief This function handles Pre-fetch fault, memory access fault.
+ */
+void BusFault_Handler(void)
+{
+ 8000dda: b480 push {r7}
+ 8000ddc: af00 add r7, sp, #0
+ /* USER CODE BEGIN BusFault_IRQn 0 */
+
+ /* USER CODE END BusFault_IRQn 0 */
+ while (1)
+ 8000dde: e7fe b.n 8000dde
+
+08000de0 :
+
+/**
+ * @brief This function handles Undefined instruction or illegal state.
+ */
+void UsageFault_Handler(void)
+{
+ 8000de0: b480 push {r7}
+ 8000de2: af00 add r7, sp, #0
+ /* USER CODE BEGIN UsageFault_IRQn 0 */
+
+ /* USER CODE END UsageFault_IRQn 0 */
+ while (1)
+ 8000de4: e7fe b.n 8000de4
+
+08000de6 :
+
+/**
+ * @brief This function handles System service call via SWI instruction.
+ */
+void SVC_Handler(void)
+{
+ 8000de6: b480 push {r7}
+ 8000de8: af00 add r7, sp, #0
+
+ /* USER CODE END SVC_IRQn 0 */
+ /* USER CODE BEGIN SVC_IRQn 1 */
+
+ /* USER CODE END SVC_IRQn 1 */
+}
+ 8000dea: bf00 nop
+ 8000dec: 46bd mov sp, r7
+ 8000dee: bc80 pop {r7}
+ 8000df0: 4770 bx lr
+
+08000df2 :
+
+/**
+ * @brief This function handles Debug monitor.
+ */
+void DebugMon_Handler(void)
+{
+ 8000df2: b480 push {r7}
+ 8000df4: af00 add r7, sp, #0
+
+ /* USER CODE END DebugMonitor_IRQn 0 */
+ /* USER CODE BEGIN DebugMonitor_IRQn 1 */
+
+ /* USER CODE END DebugMonitor_IRQn 1 */
+}
+ 8000df6: bf00 nop
+ 8000df8: 46bd mov sp, r7
+ 8000dfa: bc80 pop {r7}
+ 8000dfc: 4770 bx lr
+
+08000dfe :
+
+/**
+ * @brief This function handles Pendable request for system service.
+ */
+void PendSV_Handler(void)
+{
+ 8000dfe: b480 push {r7}
+ 8000e00: af00 add r7, sp, #0
+
+ /* USER CODE END PendSV_IRQn 0 */
+ /* USER CODE BEGIN PendSV_IRQn 1 */
+
+ /* USER CODE END PendSV_IRQn 1 */
+}
+ 8000e02: bf00 nop
+ 8000e04: 46bd mov sp, r7
+ 8000e06: bc80 pop {r7}
+ 8000e08: 4770 bx lr
+
+08000e0a :
+
+/**
+ * @brief This function handles System tick timer.
+ */
+void SysTick_Handler(void)
+{
+ 8000e0a: b580 push {r7, lr}
+ 8000e0c: af00 add r7, sp, #0
+ /* USER CODE BEGIN SysTick_IRQn 0 */
+
+ /* USER CODE END SysTick_IRQn 0 */
+ HAL_IncTick();
+ 8000e0e: f000 f927 bl 8001060
+ /* USER CODE BEGIN SysTick_IRQn 1 */
+
+ /* USER CODE END SysTick_IRQn 1 */
+}
+ 8000e12: bf00 nop
+ 8000e14: bd80 pop {r7, pc}
+
+08000e16 :
+
+/**
+ * @brief This function handles EXTI line[15:10] interrupts.
+ */
+void EXTI15_10_IRQHandler(void)
+{
+ 8000e16: b580 push {r7, lr}
+ 8000e18: af00 add r7, sp, #0
+ /* USER CODE BEGIN EXTI15_10_IRQn 0 */
+
+ /* USER CODE END EXTI15_10_IRQn 0 */
+ HAL_GPIO_EXTI_IRQHandler(B1_Pin);
+ 8000e1a: f44f 5000 mov.w r0, #8192 ; 0x2000
+ 8000e1e: f000 fbfb bl 8001618
+ /* USER CODE BEGIN EXTI15_10_IRQn 1 */
+
+ /* USER CODE END EXTI15_10_IRQn 1 */
+}
+ 8000e22: bf00 nop
+ 8000e24: bd80 pop {r7, pc}
+
+08000e26 <_read>:
+ _kill(status, -1);
+ while (1) {} /* Make sure we hang here */
+}
+
+__attribute__((weak)) int _read(int file, char *ptr, int len)
+{
+ 8000e26: b580 push {r7, lr}
+ 8000e28: b086 sub sp, #24
+ 8000e2a: af00 add r7, sp, #0
+ 8000e2c: 60f8 str r0, [r7, #12]
+ 8000e2e: 60b9 str r1, [r7, #8]
+ 8000e30: 607a str r2, [r7, #4]
+ (void)file;
+ int DataIdx;
+
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ 8000e32: 2300 movs r3, #0
+ 8000e34: 617b str r3, [r7, #20]
+ 8000e36: e00a b.n 8000e4e <_read+0x28>
+ {
+ *ptr++ = __io_getchar();
+ 8000e38: f3af 8000 nop.w
+ 8000e3c: 4601 mov r1, r0
+ 8000e3e: 68bb ldr r3, [r7, #8]
+ 8000e40: 1c5a adds r2, r3, #1
+ 8000e42: 60ba str r2, [r7, #8]
+ 8000e44: b2ca uxtb r2, r1
+ 8000e46: 701a strb r2, [r3, #0]
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ 8000e48: 697b ldr r3, [r7, #20]
+ 8000e4a: 3301 adds r3, #1
+ 8000e4c: 617b str r3, [r7, #20]
+ 8000e4e: 697a ldr r2, [r7, #20]
+ 8000e50: 687b ldr r3, [r7, #4]
+ 8000e52: 429a cmp r2, r3
+ 8000e54: dbf0 blt.n 8000e38 <_read+0x12>
+ }
+
+ return len;
+ 8000e56: 687b ldr r3, [r7, #4]
+}
+ 8000e58: 4618 mov r0, r3
+ 8000e5a: 3718 adds r7, #24
+ 8000e5c: 46bd mov sp, r7
+ 8000e5e: bd80 pop {r7, pc}
+
+08000e60 <_write>:
+
+__attribute__((weak)) int _write(int file, char *ptr, int len)
+{
+ 8000e60: b580 push {r7, lr}
+ 8000e62: b086 sub sp, #24
+ 8000e64: af00 add r7, sp, #0
+ 8000e66: 60f8 str r0, [r7, #12]
+ 8000e68: 60b9 str r1, [r7, #8]
+ 8000e6a: 607a str r2, [r7, #4]
+ (void)file;
+ int DataIdx;
+
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ 8000e6c: 2300 movs r3, #0
+ 8000e6e: 617b str r3, [r7, #20]
+ 8000e70: e009 b.n 8000e86 <_write+0x26>
+ {
+ __io_putchar(*ptr++);
+ 8000e72: 68bb ldr r3, [r7, #8]
+ 8000e74: 1c5a adds r2, r3, #1
+ 8000e76: 60ba str r2, [r7, #8]
+ 8000e78: 781b ldrb r3, [r3, #0]
+ 8000e7a: 4618 mov r0, r3
+ 8000e7c: f7ff fcee bl 800085c <__io_putchar>
+ for (DataIdx = 0; DataIdx < len; DataIdx++)
+ 8000e80: 697b ldr r3, [r7, #20]
+ 8000e82: 3301 adds r3, #1
+ 8000e84: 617b str r3, [r7, #20]
+ 8000e86: 697a ldr r2, [r7, #20]
+ 8000e88: 687b ldr r3, [r7, #4]
+ 8000e8a: 429a cmp r2, r3
+ 8000e8c: dbf1 blt.n 8000e72 <_write+0x12>
+ }
+ return len;
+ 8000e8e: 687b ldr r3, [r7, #4]
+}
+ 8000e90: 4618 mov r0, r3
+ 8000e92: 3718 adds r7, #24
+ 8000e94: 46bd mov sp, r7
+ 8000e96: bd80 pop {r7, pc}
+
+08000e98 <_close>:
+
+int _close(int file)
+{
+ 8000e98: b480 push {r7}
+ 8000e9a: b083 sub sp, #12
+ 8000e9c: af00 add r7, sp, #0
+ 8000e9e: 6078 str r0, [r7, #4]
+ (void)file;
+ return -1;
+ 8000ea0: f04f 33ff mov.w r3, #4294967295
+}
+ 8000ea4: 4618 mov r0, r3
+ 8000ea6: 370c adds r7, #12
+ 8000ea8: 46bd mov sp, r7
+ 8000eaa: bc80 pop {r7}
+ 8000eac: 4770 bx lr
+
+08000eae <_fstat>:
+
+
+int _fstat(int file, struct stat *st)
+{
+ 8000eae: b480 push {r7}
+ 8000eb0: b083 sub sp, #12
+ 8000eb2: af00 add r7, sp, #0
+ 8000eb4: 6078 str r0, [r7, #4]
+ 8000eb6: 6039 str r1, [r7, #0]
+ (void)file;
+ st->st_mode = S_IFCHR;
+ 8000eb8: 683b ldr r3, [r7, #0]
+ 8000eba: f44f 5200 mov.w r2, #8192 ; 0x2000
+ 8000ebe: 605a str r2, [r3, #4]
+ return 0;
+ 8000ec0: 2300 movs r3, #0
+}
+ 8000ec2: 4618 mov r0, r3
+ 8000ec4: 370c adds r7, #12
+ 8000ec6: 46bd mov sp, r7
+ 8000ec8: bc80 pop {r7}
+ 8000eca: 4770 bx lr
+
+08000ecc <_isatty>:
+
+int _isatty(int file)
+{
+ 8000ecc: b480 push {r7}
+ 8000ece: b083 sub sp, #12
+ 8000ed0: af00 add r7, sp, #0
+ 8000ed2: 6078 str r0, [r7, #4]
+ (void)file;
+ return 1;
+ 8000ed4: 2301 movs r3, #1
+}
+ 8000ed6: 4618 mov r0, r3
+ 8000ed8: 370c adds r7, #12
+ 8000eda: 46bd mov sp, r7
+ 8000edc: bc80 pop {r7}
+ 8000ede: 4770 bx lr
+
+08000ee0 <_lseek>:
+
+int _lseek(int file, int ptr, int dir)
+{
+ 8000ee0: b480 push {r7}
+ 8000ee2: b085 sub sp, #20
+ 8000ee4: af00 add r7, sp, #0
+ 8000ee6: 60f8 str r0, [r7, #12]
+ 8000ee8: 60b9 str r1, [r7, #8]
+ 8000eea: 607a str r2, [r7, #4]
+ (void)file;
+ (void)ptr;
+ (void)dir;
+ return 0;
+ 8000eec: 2300 movs r3, #0
+}
+ 8000eee: 4618 mov r0, r3
+ 8000ef0: 3714 adds r7, #20
+ 8000ef2: 46bd mov sp, r7
+ 8000ef4: bc80 pop {r7}
+ 8000ef6: 4770 bx lr
+
+08000ef8 <_sbrk>:
+ *
+ * @param incr Memory size
+ * @return Pointer to allocated memory
+ */
+void *_sbrk(ptrdiff_t incr)
+{
+ 8000ef8: b580 push {r7, lr}
+ 8000efa: b086 sub sp, #24
+ 8000efc: af00 add r7, sp, #0
+ 8000efe: 6078 str r0, [r7, #4]
+ extern uint8_t _end; /* Symbol defined in the linker script */
+ extern uint8_t _estack; /* Symbol defined in the linker script */
+ extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
+ const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
+ 8000f00: 4a14 ldr r2, [pc, #80] ; (8000f54 <_sbrk+0x5c>)
+ 8000f02: 4b15 ldr r3, [pc, #84] ; (8000f58 <_sbrk+0x60>)
+ 8000f04: 1ad3 subs r3, r2, r3
+ 8000f06: 617b str r3, [r7, #20]
+ const uint8_t *max_heap = (uint8_t *)stack_limit;
+ 8000f08: 697b ldr r3, [r7, #20]
+ 8000f0a: 613b str r3, [r7, #16]
+ uint8_t *prev_heap_end;
+
+ /* Initialize heap end at first call */
+ if (NULL == __sbrk_heap_end)
+ 8000f0c: 4b13 ldr r3, [pc, #76] ; (8000f5c <_sbrk+0x64>)
+ 8000f0e: 681b ldr r3, [r3, #0]
+ 8000f10: 2b00 cmp r3, #0
+ 8000f12: d102 bne.n 8000f1a <_sbrk+0x22>
+ {
+ __sbrk_heap_end = &_end;
+ 8000f14: 4b11 ldr r3, [pc, #68] ; (8000f5c <_sbrk+0x64>)
+ 8000f16: 4a12 ldr r2, [pc, #72] ; (8000f60 <_sbrk+0x68>)
+ 8000f18: 601a str r2, [r3, #0]
+ }
+
+ /* Protect heap from growing into the reserved MSP stack */
+ if (__sbrk_heap_end + incr > max_heap)
+ 8000f1a: 4b10 ldr r3, [pc, #64] ; (8000f5c <_sbrk+0x64>)
+ 8000f1c: 681a ldr r2, [r3, #0]
+ 8000f1e: 687b ldr r3, [r7, #4]
+ 8000f20: 4413 add r3, r2
+ 8000f22: 693a ldr r2, [r7, #16]
+ 8000f24: 429a cmp r2, r3
+ 8000f26: d207 bcs.n 8000f38 <_sbrk+0x40>
+ {
+ errno = ENOMEM;
+ 8000f28: f003 f800 bl 8003f2c <__errno>
+ 8000f2c: 4603 mov r3, r0
+ 8000f2e: 220c movs r2, #12
+ 8000f30: 601a str r2, [r3, #0]
+ return (void *)-1;
+ 8000f32: f04f 33ff mov.w r3, #4294967295
+ 8000f36: e009 b.n 8000f4c <_sbrk+0x54>
+ }
+
+ prev_heap_end = __sbrk_heap_end;
+ 8000f38: 4b08 ldr r3, [pc, #32] ; (8000f5c <_sbrk+0x64>)
+ 8000f3a: 681b ldr r3, [r3, #0]
+ 8000f3c: 60fb str r3, [r7, #12]
+ __sbrk_heap_end += incr;
+ 8000f3e: 4b07 ldr r3, [pc, #28] ; (8000f5c <_sbrk+0x64>)
+ 8000f40: 681a ldr r2, [r3, #0]
+ 8000f42: 687b ldr r3, [r7, #4]
+ 8000f44: 4413 add r3, r2
+ 8000f46: 4a05 ldr r2, [pc, #20] ; (8000f5c <_sbrk+0x64>)
+ 8000f48: 6013 str r3, [r2, #0]
+
+ return (void *)prev_heap_end;
+ 8000f4a: 68fb ldr r3, [r7, #12]
+}
+ 8000f4c: 4618 mov r0, r3
+ 8000f4e: 3718 adds r7, #24
+ 8000f50: 46bd mov sp, r7
+ 8000f52: bd80 pop {r7, pc}
+ 8000f54: 20014000 .word 0x20014000
+ 8000f58: 00000400 .word 0x00000400
+ 8000f5c: 2000019c .word 0x2000019c
+ 8000f60: 200001b8 .word 0x200001b8
+
+08000f64 :
+ * SystemCoreClock variable.
+ * @param None
+ * @retval None
+ */
+void SystemInit (void)
+{
+ 8000f64: b480 push {r7}
+ 8000f66: af00 add r7, sp, #0
+
+ /* Configure the Vector Table location -------------------------------------*/
+#if defined(USER_VECT_TAB_ADDRESS)
+ SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
+#endif /* USER_VECT_TAB_ADDRESS */
+}
+ 8000f68: bf00 nop
+ 8000f6a: 46bd mov sp, r7
+ 8000f6c: bc80 pop {r7}
+ 8000f6e: 4770 bx lr
+
+08000f70 :
+ .type Reset_Handler, %function
+Reset_Handler:
+
+
+/* Call the clock system initialization function.*/
+ bl SystemInit
+ 8000f70: f7ff fff8 bl 8000f64
+
+/* Copy the data segment initializers from flash to SRAM */
+ ldr r0, =_sdata
+ 8000f74: 480b ldr r0, [pc, #44] ; (8000fa4 )
+ ldr r1, =_edata
+ 8000f76: 490c ldr r1, [pc, #48] ; (8000fa8 )
+ ldr r2, =_sidata
+ 8000f78: 4a0c ldr r2, [pc, #48] ; (8000fac )
+ movs r3, #0
+ 8000f7a: 2300 movs r3, #0
+ b LoopCopyDataInit
+ 8000f7c: e002 b.n 8000f84
+
+08000f7e :
+
+CopyDataInit:
+ ldr r4, [r2, r3]
+ 8000f7e: 58d4 ldr r4, [r2, r3]
+ str r4, [r0, r3]
+ 8000f80: 50c4 str r4, [r0, r3]
+ adds r3, r3, #4
+ 8000f82: 3304 adds r3, #4
+
+08000f84 :
+
+LoopCopyDataInit:
+ adds r4, r0, r3
+ 8000f84: 18c4 adds r4, r0, r3
+ cmp r4, r1
+ 8000f86: 428c cmp r4, r1
+ bcc CopyDataInit
+ 8000f88: d3f9 bcc.n 8000f7e
+
+/* Zero fill the bss segment. */
+ ldr r2, =_sbss
+ 8000f8a: 4a09 ldr r2, [pc, #36] ; (8000fb0 )
+ ldr r4, =_ebss
+ 8000f8c: 4c09 ldr r4, [pc, #36] ; (8000fb4 )
+ movs r3, #0
+ 8000f8e: 2300 movs r3, #0
+ b LoopFillZerobss
+ 8000f90: e001 b.n 8000f96