diff --git a/.project b/.project
new file mode 100644
index 0000000..e74fa0d
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+
+
+ SDP2024-25
+
+
+
+
+
+
+
+
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
new file mode 100644
index 0000000..f912847
--- /dev/null
+++ b/.vscode/c_cpp_properties.json
@@ -0,0 +1,18 @@
+{
+ "configurations": [
+ {
+ "name": "windows-gcc-x86",
+ "includePath": [
+ "${workspaceFolder}/**"
+ ],
+ "compilerPath": "C:/MinGW/bin/gcc.exe",
+ "cStandard": "${default}",
+ "cppStandard": "${default}",
+ "intelliSenseMode": "windows-gcc-x86",
+ "compilerArgs": [
+ ""
+ ]
+ }
+ ],
+ "version": 4
+}
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..4836722
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,24 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "C/C++ Runner: Debug Session",
+ "type": "cppdbg",
+ "request": "launch",
+ "args": [],
+ "stopAtEntry": false,
+ "externalConsole": true,
+ "cwd": "g:/STMcubeIDE/repo/SDP2024-25/SDPMcu/Core/Src",
+ "program": "g:/STMcubeIDE/repo/SDP2024-25/SDPMcu/Core/Src/build/Debug/outDebug",
+ "MIMode": "gdb",
+ "miDebuggerPath": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..bb879da
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,59 @@
+{
+ "C_Cpp_Runner.cCompilerPath": "gcc",
+ "C_Cpp_Runner.cppCompilerPath": "g++",
+ "C_Cpp_Runner.debuggerPath": "gdb",
+ "C_Cpp_Runner.cStandard": "",
+ "C_Cpp_Runner.cppStandard": "",
+ "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
+ "C_Cpp_Runner.useMsvc": false,
+ "C_Cpp_Runner.warnings": [
+ "-Wall",
+ "-Wextra",
+ "-Wpedantic",
+ "-Wshadow",
+ "-Wformat=2",
+ "-Wcast-align",
+ "-Wconversion",
+ "-Wsign-conversion",
+ "-Wnull-dereference"
+ ],
+ "C_Cpp_Runner.msvcWarnings": [
+ "/W4",
+ "/permissive-",
+ "/w14242",
+ "/w14287",
+ "/w14296",
+ "/w14311",
+ "/w14826",
+ "/w44062",
+ "/w44242",
+ "/w14905",
+ "/w14906",
+ "/w14263",
+ "/w44265",
+ "/w14928"
+ ],
+ "C_Cpp_Runner.enableWarnings": true,
+ "C_Cpp_Runner.warningsAsError": false,
+ "C_Cpp_Runner.compilerArgs": [],
+ "C_Cpp_Runner.linkerArgs": [],
+ "C_Cpp_Runner.includePaths": [],
+ "C_Cpp_Runner.includeSearch": [
+ "*",
+ "**/*"
+ ],
+ "C_Cpp_Runner.excludeSearch": [
+ "**/build",
+ "**/build/**",
+ "**/.*",
+ "**/.*/**",
+ "**/.vscode",
+ "**/.vscode/**"
+ ],
+ "C_Cpp_Runner.useAddressSanitizer": false,
+ "C_Cpp_Runner.useUndefinedSanitizer": false,
+ "C_Cpp_Runner.useLeakSanitizer": false,
+ "C_Cpp_Runner.showCompilationTime": false,
+ "C_Cpp_Runner.useLinkTimeOptimization": false,
+ "C_Cpp_Runner.msvcSecureNoWarnings": false
+}
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0cfa195
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+# SDP- Integrated Circuit Testing Platform
+
+## Introduction
+
+## Documentation
+Links for documents that have been created for this project:
+
+- https://uconn-my.sharepoint.com/:w:/g/personal/joshua_bardinelli_uconn_edu/EUliDYDvrF5GoX_idqyjAl0BG9DGGmpZ30mTjRJ7wgvU3g?e=saKTSs
+- https://uconn-my.sharepoint.com/:w:/r/personal/joshua_bardinelli_uconn_edu/Documents/SDP%20GUI%20Research%20Document.docx?d=wcb05c16507374a2b8314f55390b7c250&csf=1&web=1&e=FgWobz
+- https://uconn-my.sharepoint.com/:w:/g/personal/joshua_bardinelli_uconn_edu/EYSShx6MGf1Ek37h6BFoIf4BZfhf1rLBeTsvoCVwdikPAg?e=pW5WL4
diff --git a/SDPMcu/.cproject b/SDPMcu/.cproject
index 53fc124..80c7b7d 100644
--- a/SDPMcu/.cproject
+++ b/SDPMcu/.cproject
@@ -22,7 +22,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
+
@@ -112,27 +115,27 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
-
-
+
+
-
-
-
-
+
+
-
-
+
@@ -208,5 +211,12 @@
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SDPMcu/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs b/SDPMcu/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
new file mode 100644
index 0000000..98a69fc
--- /dev/null
+++ b/SDPMcu/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
diff --git a/SDPMcu/.settings/language.settings.xml b/SDPMcu/.settings/language.settings.xml
index e9e33c7..1d3eae7 100644
--- a/SDPMcu/.settings/language.settings.xml
+++ b/SDPMcu/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/SDPMcu/Core/Src/main.c b/SDPMcu/Core/Src/main.c
index 68850d0..6beb685 100644
--- a/SDPMcu/Core/Src/main.c
+++ b/SDPMcu/Core/Src/main.c
@@ -18,6 +18,8 @@
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
+#include "cJSON.h"
+#include
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
@@ -47,13 +49,28 @@ __IO uint32_t BspButtonState = BUTTON_RELEASED;
UART_HandleTypeDef huart1;
/* USER CODE BEGIN PV */
-uint8_t tx_buffer[27] = "Welcome to BinaryUpdates!\n\r";
-uint8_t rx_indx;
-uint8_t rx_data[6];
-
-uint8_t rx_buffer[100];
-uint8_t transfer_cplt;
-
+uint8_t rx_data[1]; // Receive data one byte at a time
+uint8_t rx_buffer[300]; // Buffer to accumulate the incoming message
+uint8_t rx_index = 0; // Index to track buffer position
+int message_received = 0;
+int configured = 0;
+uint16_t pinMapping[15] = {
+ 0, // 0 (not used)
+ GPIO_PIN_1, // 1
+ GPIO_PIN_2, // 2
+ GPIO_PIN_3, // 3
+ GPIO_PIN_4, // 4
+ GPIO_PIN_5, // 5
+ GPIO_PIN_6, // 6
+ GPIO_PIN_7, // 7
+ GPIO_PIN_8, // 8
+ GPIO_PIN_9, // 9
+ GPIO_PIN_10, // 10
+ GPIO_PIN_11, // 11
+ GPIO_PIN_12, // 12
+ GPIO_PIN_13, // 13
+ GPIO_PIN_14 // 14
+};
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
@@ -123,7 +140,6 @@ int main(void)
/* USER CODE BEGIN BSP */
/* -- Sample board code to send message over COM1 port ---- */
- printf("Welcome to STM32 world !\n\r");
/* -- Sample board code to switch on leds ---- */
BSP_LED_On(LED_GREEN);
@@ -134,23 +150,97 @@ int main(void)
/* USER CODE BEGIN WHILE */
while (1)
{
-// HAL_UART_Transmit(&huart1, tx_buffer, 27, 100);
-// HAL_Delay(1000);
- /* -- Sample board code for User push-button in interrupt mode ---- */
- HAL_UART_Receive_IT(&huart1, rx_data, 6);
-
+ // Start receiving UART data byte by byte
+ HAL_UART_Receive_IT(&huart1, rx_data, 1);
+ if (message_received){
+
+ //printf("RECEIVED: %s\n",rx_buffer);
+ if(configured == 0){
+ cJSON *json = cJSON_Parse((char *)rx_buffer);
+ if (json == NULL) // Check if the parsing failed
+ {
+ printf("Error parsing JSON\n");
+ }
+ else
+ {
+ // Iterate over the JSON object and print out each key-value pair
+ cJSON *item = NULL;
+ cJSON_ArrayForEach(item, json) // Loop through each item in the JSON object
+ {
+ const char *key = item->string;
+ if (cJSON_IsString(item) && (item->valuestring != NULL))
+ {
+
+ const char *value = item ->valuestring;
+ ConfigurePin(key,value);
+
+
+ }
+ }
+ printf("DONE WITH JSON STRING\n");
+ configured = 1;
+
+ // Always delete the JSON object to avoid memory leaks
+ cJSON_Delete(json);
+// printf("DONE\n");
+
+ }
+ // Clear the flag for the next message
+ }
+ else if(configured){
+ printf("RECEIVED: %s\n",rx_buffer);
+ cJSON *json = cJSON_Parse((char *)rx_buffer);
+ if (json == NULL) // Check if the parsing failed
+ {
+ printf("Error parsing JSON\n");
+ }
+ else
+ {
+
+ cJSON *item = NULL;
+ cJSON_ArrayForEach(item, json) // Loop through each item in the JSON object
+ {
+ const char *key = item->string;
+ const char *value = item->valuestring;
+ if (cJSON_IsString(item) && (item->valuestring != NULL) && (strcmp(key,"OUTPUT")!=0))
+ {
+
+ write_pin(key,value);
+
+ }else{
+ uint8_t pin2 = atoi(value);
+ uint16_t mask2 = pinMapping[pin2];
+// printf("MASK 2 IS %d\n",mask2);
+// HAL_Delay(20);
+ GPIO_PinState pinState = HAL_GPIO_ReadPin(GPIOA, mask2);
+ if (pinState == GPIO_PIN_SET) {
+ // The pin is high (logic 1)
+ printf("VALUE IS %s 1\n",value);
+ } else {
+ printf("VALUE IS %s 0\n",value);
+ // The pin is low (logic 0)
+ }
+ }
+ }
+ cJSON_Delete(json);
+ }
+ }
+ message_received = 0;
+ }
if (BspButtonState == BUTTON_PRESSED)
{
/* Update button state */
BspButtonState = BUTTON_RELEASED;
/* -- Sample board code to toggle leds ---- */
- BSP_LED_Toggle(LED_GREEN);
+// BSP_LED_Toggle(LED_GREEN)
/* ..... Perform your action ..... */
}
+
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
+
}
/* USER CODE END 3 */
}
@@ -251,23 +341,102 @@ static void MX_GPIO_Init(void)
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOF_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
+ __HAL_RCC_GPIOB_CLK_ENABLE();
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
+int _write(int file, char *ptr, int len) {
+ HAL_UART_Transmit(&huart1, (uint8_t*)ptr, len, HAL_MAX_DELAY);
+ return len;
+}
+
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(huart);
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_UART_RxCpltCallback can be implemented in the user file.
- */
- uint8_t response[]= "Received!\n";
- HAL_UART_Transmit(&huart1,response, sizeof(response)-1, 10);
+ if (huart->Instance == USART1) // Check if the interrupt is for UART1
+ {
+ // If received character is not newline, accumulate it in the buffer
+ if (rx_data[0] != '\n')
+ {
+ rx_buffer[rx_index++] = rx_data[0]; // Store received byte in buffer
+ if (rx_index >= sizeof(rx_buffer)) // Prevent buffer overflow
+ {
+ rx_index = 0; // Reset index if the buffer is full
+ }
+ }
+ else
+ {
+ // When newline character is received, complete the message and reset buffer
+ rx_buffer[rx_index] = '\0'; // Null-terminate the string
+ message_received =1;
+ rx_index = 0; // Reset the buffer index for the next message
+ }
+
+ // Continue receiving next byte
+ HAL_UART_Receive_IT(&huart1, rx_data, 1);
+ }
+}
+void ConfigurePin(const char *pin_number, const char *value){
+
+ GPIO_InitTypeDef GPIO_InitStruct = {0};
+
+ __HAL_RCC_GPIOA_CLK_ENABLE();
+ uint8_t pin = atoi(pin_number);
+ uint16_t mask = pinMapping[pin];
+ printf("CONFIGURE Pin %s: %s\n, ", pin_number, value);
+
+ GPIO_InitStruct.Pin = mask;
+ if (strcmp(value, "INPUT") == 0) {
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ } else if (strcmp(value, "OUTPUT") == 0) {
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ } else if (strcmp(value, "CLK") == 0) {
+ GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
+ GPIO_InitStruct.Alternate = GPIO_AF0_MCO;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ } else if (strcmp(value, "GND") == 0) {
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ HAL_GPIO_WritePin(GPIOA, GPIO_InitStruct.Pin, GPIO_PIN_RESET);
+ } else if (strcmp(value, "VCC") == 0) {
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+ HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ HAL_GPIO_WritePin(GPIOA, GPIO_InitStruct.Pin, GPIO_PIN_SET);
+ } else {
+ printf("Invalid configuration mode\n");
+ return;
+ }
+
+}
+
+void write_pin(const char *pin_number,const char *value){
+ printf("writing Pin %s: %s\n", pin_number, value);
+ uint8_t pin = atoi(pin_number);
+ uint16_t mask3 = pinMapping[pin];
+ if(strcmp(value, "1") == 0){
+ HAL_GPIO_WritePin(GPIOA, mask3, GPIO_PIN_SET); // Set pin high
+ }else{
+ HAL_GPIO_WritePin(GPIOA, mask3, GPIO_PIN_RESET); // Set pin high
+ }
}
+
+
/* USER CODE END 4 */
/**
diff --git a/SDPMcu/Core/Src/stm32c0xx_hal_msp.c b/SDPMcu/Core/Src/stm32c0xx_hal_msp.c
index 4cee99b..c0361f1 100644
--- a/SDPMcu/Core/Src/stm32c0xx_hal_msp.c
+++ b/SDPMcu/Core/Src/stm32c0xx_hal_msp.c
@@ -106,17 +106,17 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
- __HAL_RCC_GPIOA_CLK_ENABLE();
+ __HAL_RCC_GPIOB_CLK_ENABLE();
/**USART1 GPIO Configuration
- PA0 ------> USART1_TX
- PA1 ------> USART1_RX
+ PB6 ------> USART1_TX
+ PB7 ------> USART1_RX
*/
- GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
+ GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- GPIO_InitStruct.Alternate = GPIO_AF4_USART1;
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ GPIO_InitStruct.Alternate = GPIO_AF0_USART1;
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USART1 interrupt Init */
HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
@@ -146,10 +146,10 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
__HAL_RCC_USART1_CLK_DISABLE();
/**USART1 GPIO Configuration
- PA0 ------> USART1_TX
- PA1 ------> USART1_RX
+ PB6 ------> USART1_TX
+ PB7 ------> USART1_RX
*/
- HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0|GPIO_PIN_1);
+ HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
/* USART1 interrupt DeInit */
HAL_NVIC_DisableIRQ(USART1_IRQn);
diff --git a/SDPMcu/Debug/Core/Src/cJSON.d b/SDPMcu/Debug/Core/Src/cJSON.d
new file mode 100644
index 0000000..ff51c48
--- /dev/null
+++ b/SDPMcu/Debug/Core/Src/cJSON.d
@@ -0,0 +1,2 @@
+Core/Src/cJSON.o: ../Core/Src/cJSON.c ../Core/Inc/cJSON.h
+../Core/Inc/cJSON.h:
diff --git a/SDPMcu/Debug/Core/Src/cJSON.o b/SDPMcu/Debug/Core/Src/cJSON.o
new file mode 100644
index 0000000..24f3209
Binary files /dev/null and b/SDPMcu/Debug/Core/Src/cJSON.o differ
diff --git a/SDPMcu/Debug/Core/Src/main.d b/SDPMcu/Debug/Core/Src/main.d
index c41a171..6bc37d9 100644
--- a/SDPMcu/Debug/Core/Src/main.d
+++ b/SDPMcu/Debug/Core/Src/main.d
@@ -29,7 +29,8 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
../Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_hal_uart_ex.h \
../Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo.h \
../Core/Inc/stm32c0xx_nucleo_conf.h \
- ../Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo_errno.h
+ ../Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo_errno.h \
+ ../Core/Inc/cJSON.h
../Core/Inc/main.h:
../Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_hal.h:
../Drivers/STM32C0xx_HAL_Driver/Inc/stm32c0xx_ll_system.h:
@@ -62,3 +63,4 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
../Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo.h:
../Core/Inc/stm32c0xx_nucleo_conf.h:
../Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo_errno.h:
+../Core/Inc/cJSON.h:
diff --git a/SDPMcu/Debug/Core/Src/main.o b/SDPMcu/Debug/Core/Src/main.o
index 3c058cd..29efba1 100644
Binary files a/SDPMcu/Debug/Core/Src/main.o and b/SDPMcu/Debug/Core/Src/main.o differ
diff --git a/SDPMcu/Debug/Core/Src/stm32c0xx_hal_msp.o b/SDPMcu/Debug/Core/Src/stm32c0xx_hal_msp.o
index 9ee7815..0291b2c 100644
Binary files a/SDPMcu/Debug/Core/Src/stm32c0xx_hal_msp.o and b/SDPMcu/Debug/Core/Src/stm32c0xx_hal_msp.o differ
diff --git a/SDPMcu/Debug/Core/Src/stm32c0xx_it.o b/SDPMcu/Debug/Core/Src/stm32c0xx_it.o
index 3d95082..2aae251 100644
Binary files a/SDPMcu/Debug/Core/Src/stm32c0xx_it.o and b/SDPMcu/Debug/Core/Src/stm32c0xx_it.o differ
diff --git a/SDPMcu/Debug/Core/Src/subdir.mk b/SDPMcu/Debug/Core/Src/subdir.mk
index 4dd2b9e..e5dbe0d 100644
--- a/SDPMcu/Debug/Core/Src/subdir.mk
+++ b/SDPMcu/Debug/Core/Src/subdir.mk
@@ -5,6 +5,7 @@
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
+../Core/Src/cJSON.c \
../Core/Src/main.c \
../Core/Src/stm32c0xx_hal_msp.c \
../Core/Src/stm32c0xx_it.c \
@@ -13,6 +14,7 @@ C_SRCS += \
../Core/Src/system_stm32c0xx.c
C_DEPS += \
+./Core/Src/cJSON.d \
./Core/Src/main.d \
./Core/Src/stm32c0xx_hal_msp.d \
./Core/Src/stm32c0xx_it.d \
@@ -21,6 +23,7 @@ C_DEPS += \
./Core/Src/system_stm32c0xx.d
OBJS += \
+./Core/Src/cJSON.o \
./Core/Src/main.o \
./Core/Src/stm32c0xx_hal_msp.o \
./Core/Src/stm32c0xx_it.o \
@@ -31,12 +34,12 @@ OBJS += \
# 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-m0plus -std=gnu11 -g3 -DDEBUG -DUSE_NUCLEO_64 -DUSE_HAL_DRIVER -DSTM32C031xx -c -I../Core/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc/Legacy -I../Drivers/BSP/STM32C0xx_Nucleo -I../Drivers/CMSIS/Device/ST/STM32C0xx/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 "$@"
+ arm-none-eabi-gcc "$<" -mcpu=cortex-m0plus -std=gnu11 -g3 -DDEBUG -DUSE_NUCLEO_64 -DUSE_HAL_DRIVER -DSTM32C031xx -c -I../Core/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc/Legacy -I../Drivers/BSP/STM32C0xx_Nucleo -I../Drivers/CMSIS/Device/ST/STM32C0xx/Include -I../Drivers/CMSIS/Include -Os -ffunction-sections -fdata-sections -Wall -flto -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/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32c0xx_hal_msp.cyclo ./Core/Src/stm32c0xx_hal_msp.d ./Core/Src/stm32c0xx_hal_msp.o ./Core/Src/stm32c0xx_hal_msp.su ./Core/Src/stm32c0xx_it.cyclo ./Core/Src/stm32c0xx_it.d ./Core/Src/stm32c0xx_it.o ./Core/Src/stm32c0xx_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_stm32c0xx.cyclo ./Core/Src/system_stm32c0xx.d ./Core/Src/system_stm32c0xx.o ./Core/Src/system_stm32c0xx.su
+ -$(RM) ./Core/Src/cJSON.cyclo ./Core/Src/cJSON.d ./Core/Src/cJSON.o ./Core/Src/cJSON.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32c0xx_hal_msp.cyclo ./Core/Src/stm32c0xx_hal_msp.d ./Core/Src/stm32c0xx_hal_msp.o ./Core/Src/stm32c0xx_hal_msp.su ./Core/Src/stm32c0xx_it.cyclo ./Core/Src/stm32c0xx_it.d ./Core/Src/stm32c0xx_it.o ./Core/Src/stm32c0xx_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_stm32c0xx.cyclo ./Core/Src/system_stm32c0xx.d ./Core/Src/system_stm32c0xx.o ./Core/Src/system_stm32c0xx.su
.PHONY: clean-Core-2f-Src
diff --git a/SDPMcu/Debug/Core/Src/syscalls.o b/SDPMcu/Debug/Core/Src/syscalls.o
index c4ef6a1..a2e2464 100644
Binary files a/SDPMcu/Debug/Core/Src/syscalls.o and b/SDPMcu/Debug/Core/Src/syscalls.o differ
diff --git a/SDPMcu/Debug/Core/Src/sysmem.o b/SDPMcu/Debug/Core/Src/sysmem.o
index bb612a3..9a42543 100644
Binary files a/SDPMcu/Debug/Core/Src/sysmem.o and b/SDPMcu/Debug/Core/Src/sysmem.o differ
diff --git a/SDPMcu/Debug/Core/Src/system_stm32c0xx.o b/SDPMcu/Debug/Core/Src/system_stm32c0xx.o
index 0effc32..9ab42a4 100644
Binary files a/SDPMcu/Debug/Core/Src/system_stm32c0xx.o and b/SDPMcu/Debug/Core/Src/system_stm32c0xx.o differ
diff --git a/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo.o b/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo.o
index faa4ac3..60ea339 100644
Binary files a/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo.o and b/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/stm32c0xx_nucleo.o differ
diff --git a/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/subdir.mk b/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/subdir.mk
index 6f26419..c7b48fc 100644
--- a/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/subdir.mk
+++ b/SDPMcu/Debug/Drivers/BSP/STM32C0xx_Nucleo/subdir.mk
@@ -16,7 +16,7 @@ OBJS += \
# Each subdirectory must supply rules for building sources it contributes
Drivers/BSP/STM32C0xx_Nucleo/%.o Drivers/BSP/STM32C0xx_Nucleo/%.su Drivers/BSP/STM32C0xx_Nucleo/%.cyclo: ../Drivers/BSP/STM32C0xx_Nucleo/%.c Drivers/BSP/STM32C0xx_Nucleo/subdir.mk
- arm-none-eabi-gcc "$<" -mcpu=cortex-m0plus -std=gnu11 -g3 -DDEBUG -DUSE_NUCLEO_64 -DUSE_HAL_DRIVER -DSTM32C031xx -c -I../Core/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc/Legacy -I../Drivers/BSP/STM32C0xx_Nucleo -I../Drivers/CMSIS/Device/ST/STM32C0xx/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 "$@"
+ arm-none-eabi-gcc "$<" -mcpu=cortex-m0plus -std=gnu11 -g3 -DDEBUG -DUSE_NUCLEO_64 -DUSE_HAL_DRIVER -DSTM32C031xx -c -I../Core/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc/Legacy -I../Drivers/BSP/STM32C0xx_Nucleo -I../Drivers/CMSIS/Device/ST/STM32C0xx/Include -I../Drivers/CMSIS/Include -Os -ffunction-sections -fdata-sections -Wall -flto -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
clean: clean-Drivers-2f-BSP-2f-STM32C0xx_Nucleo
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal.o
index f0ba5f3..3a62859 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_cortex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_cortex.o
index c44ba15..f74094c 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_cortex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_cortex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma.o
index 8d85132..1b0aa82 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma_ex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma_ex.o
index 16d353c..2c633cd 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma_ex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_dma_ex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_exti.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_exti.o
index cc12e55..7ba04f6 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_exti.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_exti.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash.o
index 9ca419a..fe20549 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash_ex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash_ex.o
index e6c1eb3..307254b 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash_ex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_flash_ex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_gpio.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_gpio.o
index ee1fed8..20eeac9 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_gpio.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_gpio.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr.o
index 8b1ac35..5b54e4c 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr_ex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr_ex.o
index 3111c76..6631ee1 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr_ex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_pwr_ex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc.o
index 558cd1b..6f73383 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc_ex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc_ex.o
index 98b15d9..f9d42a9 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc_ex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_rcc_ex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim.o
index 97bc1c5..8266540 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim_ex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim_ex.o
index 892363b..86c4118 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim_ex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_tim_ex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart.o
index 2056774..6d01a68 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart_ex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart_ex.o
index 607ca37..9b69c23 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart_ex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_uart_ex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart.o
index b796e84..1823acd 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart_ex.o b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart_ex.o
index 8506ec9..7e1441d 100644
Binary files a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart_ex.o and b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/stm32c0xx_hal_usart_ex.o differ
diff --git a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/subdir.mk b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/subdir.mk
index 45fc27d..6cd62c6 100644
--- a/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/subdir.mk
+++ b/SDPMcu/Debug/Drivers/STM32C0xx_HAL_Driver/Src/subdir.mk
@@ -67,7 +67,7 @@ OBJS += \
# Each subdirectory must supply rules for building sources it contributes
Drivers/STM32C0xx_HAL_Driver/Src/%.o Drivers/STM32C0xx_HAL_Driver/Src/%.su Drivers/STM32C0xx_HAL_Driver/Src/%.cyclo: ../Drivers/STM32C0xx_HAL_Driver/Src/%.c Drivers/STM32C0xx_HAL_Driver/Src/subdir.mk
- arm-none-eabi-gcc "$<" -mcpu=cortex-m0plus -std=gnu11 -g3 -DDEBUG -DUSE_NUCLEO_64 -DUSE_HAL_DRIVER -DSTM32C031xx -c -I../Core/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc/Legacy -I../Drivers/BSP/STM32C0xx_Nucleo -I../Drivers/CMSIS/Device/ST/STM32C0xx/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 "$@"
+ arm-none-eabi-gcc "$<" -mcpu=cortex-m0plus -std=gnu11 -g3 -DDEBUG -DUSE_NUCLEO_64 -DUSE_HAL_DRIVER -DSTM32C031xx -c -I../Core/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc -I../Drivers/STM32C0xx_HAL_Driver/Inc/Legacy -I../Drivers/BSP/STM32C0xx_Nucleo -I../Drivers/CMSIS/Device/ST/STM32C0xx/Include -I../Drivers/CMSIS/Include -Os -ffunction-sections -fdata-sections -Wall -flto -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@"
clean: clean-Drivers-2f-STM32C0xx_HAL_Driver-2f-Src
diff --git a/SDPMcu/Debug/SDPMcu.elf b/SDPMcu/Debug/SDPMcu.elf
index 4f2330c..01058c7 100644
Binary files a/SDPMcu/Debug/SDPMcu.elf and b/SDPMcu/Debug/SDPMcu.elf differ
diff --git a/SDPMcu/Debug/SDPMcu.list b/SDPMcu/Debug/SDPMcu.list
index 990af0a..766cb85 100644
--- a/SDPMcu/Debug/SDPMcu.list
+++ b/SDPMcu/Debug/SDPMcu.list
@@ -5,47 +5,49 @@ Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 000000c0 08000000 08000000 00001000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 .text 00004de0 080000c0 080000c0 000010c0 2**2
+ 1 .text 0000721c 080000c0 080000c0 000010c0 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 000000ec 08004ea0 08004ea0 00005ea0 2**2
+ 2 .rodata 00000570 080072e0 080072e0 000082e0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 08004f8c 08004f8c 00006080 2**0
+ 3 .ARM.extab 00000000 08007850 08007850 000091dc 2**0
CONTENTS
- 4 .ARM 00000000 08004f8c 08004f8c 00006080 2**0
+ 4 .ARM 00000000 08007850 08007850 000091dc 2**0
CONTENTS
- 5 .preinit_array 00000000 08004f8c 08004f8c 00006080 2**0
+ 5 .preinit_array 00000000 08007850 08007850 000091dc 2**0
CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 08004f8c 08004f8c 00005f8c 2**2
+ 6 .init_array 00000004 08007850 08007850 00008850 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 7 .fini_array 00000004 08004f90 08004f90 00005f90 2**2
+ 7 .fini_array 00000004 08007854 08007854 00008854 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 8 .data 00000080 20000000 08004f94 00006000 2**2
+ 8 .data 000001dc 20000000 08007858 00009000 2**2
CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 000002c4 20000080 08005014 00006080 2**2
+ 9 .bss 000003f0 200001dc 08007a34 000091dc 2**2
ALLOC
- 10 ._user_heap_stack 00000604 20000344 08005014 00006344 2**0
+ 10 ._user_heap_stack 00000604 200005cc 08007a34 000095cc 2**0
ALLOC
- 11 .ARM.attributes 00000028 00000000 00000000 00006080 2**0
+ 11 .ARM.attributes 00000028 00000000 00000000 000091dc 2**0
CONTENTS, READONLY
- 12 .debug_info 0000ced5 00000000 00000000 000060a8 2**0
+ 12 .debug_info 0000f490 00000000 00000000 00009204 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 13 .debug_abbrev 0000221e 00000000 00000000 00012f7d 2**0
+ 13 .debug_abbrev 000021b0 00000000 00000000 00018694 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 14 .debug_aranges 000009c0 00000000 00000000 000151a0 2**3
+ 14 .debug_loclists 000023a9 00000000 00000000 0001a844 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 15 .debug_rnglists 0000076e 00000000 00000000 00015b60 2**0
+ 15 .debug_aranges 00000050 00000000 00000000 0001cbf0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
- 16 .debug_macro 000147a7 00000000 00000000 000162ce 2**0
+ 16 .debug_rnglists 000004bf 00000000 00000000 0001cc40 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 17 .debug_line 0000d4f0 00000000 00000000 0002aa75 2**0
+ 17 .debug_line 00004923 00000000 00000000 0001d0ff 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 18 .debug_str 000785bc 00000000 00000000 00037f65 2**0
+ 18 .debug_str 0007b4c6 00000000 00000000 00021a22 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 19 .comment 00000043 00000000 00000000 000b0521 2**0
+ 19 .comment 00000043 00000000 00000000 0009cee8 2**0
CONTENTS, READONLY
- 20 .debug_frame 000028a4 00000000 00000000 000b0564 2**2
+ 20 .debug_frame 00001804 00000000 00000000 0009cf2c 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
- 21 .debug_line_str 00000047 00000000 00000000 000b2e08 2**0
+ 21 .debug_macro 0001516e 00000000 00000000 0009e730 2**0
+ CONTENTS, READONLY, DEBUGGING, OCTETS
+ 22 .debug_line_str 00000cf5 00000000 00000000 000b389e 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
@@ -65,9 +67,9 @@ Disassembly of section .text:
80000d6: 2301 movs r3, #1
80000d8: 7023 strb r3, [r4, #0]
80000da: bd10 pop {r4, pc}
- 80000dc: 20000080 .word 0x20000080
+ 80000dc: 200001dc .word 0x200001dc
80000e0: 00000000 .word 0x00000000
- 80000e4: 08004e88 .word 0x08004e88
+ 80000e4: 080072c4 .word 0x080072c4
080000e8 :
80000e8: 4b04 ldr r3, [pc, #16] @ (80000fc )
@@ -81,10001 +83,16148 @@ Disassembly of section .text:
80000f8: bd10 pop {r4, pc}
80000fa: 46c0 nop @ (mov r8, r8)
80000fc: 00000000 .word 0x00000000
- 8000100: 20000084 .word 0x20000084
- 8000104: 08004e88 .word 0x08004e88
-
-08000108 <__gnu_thumb1_case_shi>:
- 8000108: b403 push {r0, r1}
- 800010a: 4671 mov r1, lr
- 800010c: 0849 lsrs r1, r1, #1
- 800010e: 0040 lsls r0, r0, #1
- 8000110: 0049 lsls r1, r1, #1
- 8000112: 5e09 ldrsh r1, [r1, r0]
- 8000114: 0049 lsls r1, r1, #1
- 8000116: 448e add lr, r1
- 8000118: bc03 pop {r0, r1}
- 800011a: 4770 bx lr
-
-0800011c <__udivsi3>:
- 800011c: 2200 movs r2, #0
- 800011e: 0843 lsrs r3, r0, #1
- 8000120: 428b cmp r3, r1
- 8000122: d374 bcc.n 800020e <__udivsi3+0xf2>
- 8000124: 0903 lsrs r3, r0, #4
- 8000126: 428b cmp r3, r1
- 8000128: d35f bcc.n 80001ea <__udivsi3+0xce>
- 800012a: 0a03 lsrs r3, r0, #8
- 800012c: 428b cmp r3, r1
- 800012e: d344 bcc.n 80001ba <__udivsi3+0x9e>
- 8000130: 0b03 lsrs r3, r0, #12
- 8000132: 428b cmp r3, r1
- 8000134: d328 bcc.n 8000188 <__udivsi3+0x6c>
- 8000136: 0c03 lsrs r3, r0, #16
- 8000138: 428b cmp r3, r1
- 800013a: d30d bcc.n 8000158 <__udivsi3+0x3c>
- 800013c: 22ff movs r2, #255 @ 0xff
- 800013e: 0209 lsls r1, r1, #8
- 8000140: ba12 rev r2, r2
- 8000142: 0c03 lsrs r3, r0, #16
- 8000144: 428b cmp r3, r1
- 8000146: d302 bcc.n 800014e <__udivsi3+0x32>
- 8000148: 1212 asrs r2, r2, #8
- 800014a: 0209 lsls r1, r1, #8
- 800014c: d065 beq.n 800021a <__udivsi3+0xfe>
- 800014e: 0b03 lsrs r3, r0, #12
- 8000150: 428b cmp r3, r1
- 8000152: d319 bcc.n 8000188 <__udivsi3+0x6c>
- 8000154: e000 b.n 8000158 <__udivsi3+0x3c>
- 8000156: 0a09 lsrs r1, r1, #8
- 8000158: 0bc3 lsrs r3, r0, #15
- 800015a: 428b cmp r3, r1
- 800015c: d301 bcc.n 8000162 <__udivsi3+0x46>
- 800015e: 03cb lsls r3, r1, #15
- 8000160: 1ac0 subs r0, r0, r3
- 8000162: 4152 adcs r2, r2
- 8000164: 0b83 lsrs r3, r0, #14
- 8000166: 428b cmp r3, r1
- 8000168: d301 bcc.n 800016e <__udivsi3+0x52>
- 800016a: 038b lsls r3, r1, #14
- 800016c: 1ac0 subs r0, r0, r3
- 800016e: 4152 adcs r2, r2
- 8000170: 0b43 lsrs r3, r0, #13
- 8000172: 428b cmp r3, r1
- 8000174: d301 bcc.n 800017a <__udivsi3+0x5e>
- 8000176: 034b lsls r3, r1, #13
- 8000178: 1ac0 subs r0, r0, r3
- 800017a: 4152 adcs r2, r2
- 800017c: 0b03 lsrs r3, r0, #12
- 800017e: 428b cmp r3, r1
- 8000180: d301 bcc.n 8000186 <__udivsi3+0x6a>
- 8000182: 030b lsls r3, r1, #12
- 8000184: 1ac0 subs r0, r0, r3
- 8000186: 4152 adcs r2, r2
- 8000188: 0ac3 lsrs r3, r0, #11
- 800018a: 428b cmp r3, r1
- 800018c: d301 bcc.n 8000192 <__udivsi3+0x76>
- 800018e: 02cb lsls r3, r1, #11
- 8000190: 1ac0 subs r0, r0, r3
- 8000192: 4152 adcs r2, r2
- 8000194: 0a83 lsrs r3, r0, #10
- 8000196: 428b cmp r3, r1
- 8000198: d301 bcc.n 800019e <__udivsi3+0x82>
- 800019a: 028b lsls r3, r1, #10
- 800019c: 1ac0 subs r0, r0, r3
- 800019e: 4152 adcs r2, r2
- 80001a0: 0a43 lsrs r3, r0, #9
- 80001a2: 428b cmp r3, r1
- 80001a4: d301 bcc.n 80001aa <__udivsi3+0x8e>
- 80001a6: 024b lsls r3, r1, #9
- 80001a8: 1ac0 subs r0, r0, r3
- 80001aa: 4152 adcs r2, r2
- 80001ac: 0a03 lsrs r3, r0, #8
- 80001ae: 428b cmp r3, r1
- 80001b0: d301 bcc.n 80001b6 <__udivsi3+0x9a>
- 80001b2: 020b lsls r3, r1, #8
- 80001b4: 1ac0 subs r0, r0, r3
- 80001b6: 4152 adcs r2, r2
- 80001b8: d2cd bcs.n 8000156 <__udivsi3+0x3a>
- 80001ba: 09c3 lsrs r3, r0, #7
- 80001bc: 428b cmp r3, r1
- 80001be: d301 bcc.n 80001c4 <__udivsi3+0xa8>
- 80001c0: 01cb lsls r3, r1, #7
- 80001c2: 1ac0 subs r0, r0, r3
- 80001c4: 4152 adcs r2, r2
- 80001c6: 0983 lsrs r3, r0, #6
- 80001c8: 428b cmp r3, r1
- 80001ca: d301 bcc.n 80001d0 <__udivsi3+0xb4>
- 80001cc: 018b lsls r3, r1, #6
- 80001ce: 1ac0 subs r0, r0, r3
- 80001d0: 4152 adcs r2, r2
- 80001d2: 0943 lsrs r3, r0, #5
- 80001d4: 428b cmp r3, r1
- 80001d6: d301 bcc.n 80001dc <__udivsi3+0xc0>
- 80001d8: 014b lsls r3, r1, #5
- 80001da: 1ac0 subs r0, r0, r3
- 80001dc: 4152 adcs r2, r2
- 80001de: 0903 lsrs r3, r0, #4
- 80001e0: 428b cmp r3, r1
- 80001e2: d301 bcc.n 80001e8 <__udivsi3+0xcc>
- 80001e4: 010b lsls r3, r1, #4
- 80001e6: 1ac0 subs r0, r0, r3
- 80001e8: 4152 adcs r2, r2
- 80001ea: 08c3 lsrs r3, r0, #3
- 80001ec: 428b cmp r3, r1
- 80001ee: d301 bcc.n 80001f4 <__udivsi3+0xd8>
- 80001f0: 00cb lsls r3, r1, #3
- 80001f2: 1ac0 subs r0, r0, r3
- 80001f4: 4152 adcs r2, r2
- 80001f6: 0883 lsrs r3, r0, #2
- 80001f8: 428b cmp r3, r1
- 80001fa: d301 bcc.n 8000200 <__udivsi3+0xe4>
- 80001fc: 008b lsls r3, r1, #2
- 80001fe: 1ac0 subs r0, r0, r3
- 8000200: 4152 adcs r2, r2
- 8000202: 0843 lsrs r3, r0, #1
- 8000204: 428b cmp r3, r1
- 8000206: d301 bcc.n 800020c <__udivsi3+0xf0>
- 8000208: 004b lsls r3, r1, #1
- 800020a: 1ac0 subs r0, r0, r3
- 800020c: 4152 adcs r2, r2
- 800020e: 1a41 subs r1, r0, r1
- 8000210: d200 bcs.n 8000214 <__udivsi3+0xf8>
- 8000212: 4601 mov r1, r0
- 8000214: 4152 adcs r2, r2
- 8000216: 4610 mov r0, r2
- 8000218: 4770 bx lr
- 800021a: e7ff b.n 800021c <__udivsi3+0x100>
- 800021c: b501 push {r0, lr}
- 800021e: 2000 movs r0, #0
- 8000220: f000 f8f0 bl 8000404 <__aeabi_idiv0>
- 8000224: bd02 pop {r1, pc}
- 8000226: 46c0 nop @ (mov r8, r8)
-
-08000228 <__aeabi_uidivmod>:
- 8000228: 2900 cmp r1, #0
- 800022a: d0f7 beq.n 800021c <__udivsi3+0x100>
- 800022c: e776 b.n 800011c <__udivsi3>
- 800022e: 4770 bx lr
-
-08000230 <__divsi3>:
- 8000230: 4603 mov r3, r0
- 8000232: 430b orrs r3, r1
- 8000234: d47f bmi.n 8000336 <__divsi3+0x106>
- 8000236: 2200 movs r2, #0
- 8000238: 0843 lsrs r3, r0, #1
- 800023a: 428b cmp r3, r1
- 800023c: d374 bcc.n 8000328 <__divsi3+0xf8>
- 800023e: 0903 lsrs r3, r0, #4
- 8000240: 428b cmp r3, r1
- 8000242: d35f bcc.n 8000304 <__divsi3+0xd4>
- 8000244: 0a03 lsrs r3, r0, #8
- 8000246: 428b cmp r3, r1
- 8000248: d344 bcc.n 80002d4 <__divsi3+0xa4>
- 800024a: 0b03 lsrs r3, r0, #12
- 800024c: 428b cmp r3, r1
- 800024e: d328 bcc.n 80002a2 <__divsi3+0x72>
- 8000250: 0c03 lsrs r3, r0, #16
- 8000252: 428b cmp r3, r1
- 8000254: d30d bcc.n 8000272 <__divsi3+0x42>
- 8000256: 22ff movs r2, #255 @ 0xff
- 8000258: 0209 lsls r1, r1, #8
- 800025a: ba12 rev r2, r2
- 800025c: 0c03 lsrs r3, r0, #16
- 800025e: 428b cmp r3, r1
- 8000260: d302 bcc.n 8000268 <__divsi3+0x38>
- 8000262: 1212 asrs r2, r2, #8
- 8000264: 0209 lsls r1, r1, #8
- 8000266: d065 beq.n 8000334 <__divsi3+0x104>
- 8000268: 0b03 lsrs r3, r0, #12
- 800026a: 428b cmp r3, r1
- 800026c: d319 bcc.n 80002a2 <__divsi3+0x72>
- 800026e: e000 b.n 8000272 <__divsi3+0x42>
- 8000270: 0a09 lsrs r1, r1, #8
- 8000272: 0bc3 lsrs r3, r0, #15
- 8000274: 428b cmp r3, r1
- 8000276: d301 bcc.n 800027c <__divsi3+0x4c>
- 8000278: 03cb lsls r3, r1, #15
- 800027a: 1ac0 subs r0, r0, r3
- 800027c: 4152 adcs r2, r2
- 800027e: 0b83 lsrs r3, r0, #14
- 8000280: 428b cmp r3, r1
- 8000282: d301 bcc.n 8000288 <__divsi3+0x58>
- 8000284: 038b lsls r3, r1, #14
- 8000286: 1ac0 subs r0, r0, r3
- 8000288: 4152 adcs r2, r2
- 800028a: 0b43 lsrs r3, r0, #13
- 800028c: 428b cmp r3, r1
- 800028e: d301 bcc.n 8000294 <__divsi3+0x64>
- 8000290: 034b lsls r3, r1, #13
- 8000292: 1ac0 subs r0, r0, r3
- 8000294: 4152 adcs r2, r2
- 8000296: 0b03 lsrs r3, r0, #12
- 8000298: 428b cmp r3, r1
- 800029a: d301 bcc.n 80002a0 <__divsi3+0x70>
- 800029c: 030b lsls r3, r1, #12
- 800029e: 1ac0 subs r0, r0, r3
- 80002a0: 4152 adcs r2, r2
- 80002a2: 0ac3 lsrs r3, r0, #11
- 80002a4: 428b cmp r3, r1
- 80002a6: d301 bcc.n 80002ac <__divsi3+0x7c>
- 80002a8: 02cb lsls r3, r1, #11
- 80002aa: 1ac0 subs r0, r0, r3
- 80002ac: 4152 adcs r2, r2
- 80002ae: 0a83 lsrs r3, r0, #10
- 80002b0: 428b cmp r3, r1
- 80002b2: d301 bcc.n 80002b8 <__divsi3+0x88>
- 80002b4: 028b lsls r3, r1, #10
- 80002b6: 1ac0 subs r0, r0, r3
- 80002b8: 4152 adcs r2, r2
- 80002ba: 0a43 lsrs r3, r0, #9
- 80002bc: 428b cmp r3, r1
- 80002be: d301 bcc.n 80002c4 <__divsi3+0x94>
- 80002c0: 024b lsls r3, r1, #9
- 80002c2: 1ac0 subs r0, r0, r3
- 80002c4: 4152 adcs r2, r2
- 80002c6: 0a03 lsrs r3, r0, #8
- 80002c8: 428b cmp r3, r1
- 80002ca: d301 bcc.n 80002d0 <__divsi3+0xa0>
- 80002cc: 020b lsls r3, r1, #8
- 80002ce: 1ac0 subs r0, r0, r3
- 80002d0: 4152 adcs r2, r2
- 80002d2: d2cd bcs.n 8000270 <__divsi3+0x40>
- 80002d4: 09c3 lsrs r3, r0, #7
- 80002d6: 428b cmp r3, r1
- 80002d8: d301 bcc.n 80002de <__divsi3+0xae>
- 80002da: 01cb lsls r3, r1, #7
- 80002dc: 1ac0 subs r0, r0, r3
- 80002de: 4152 adcs r2, r2
- 80002e0: 0983 lsrs r3, r0, #6
- 80002e2: 428b cmp r3, r1
- 80002e4: d301 bcc.n 80002ea <__divsi3+0xba>
- 80002e6: 018b lsls r3, r1, #6
- 80002e8: 1ac0 subs r0, r0, r3
- 80002ea: 4152 adcs r2, r2
- 80002ec: 0943 lsrs r3, r0, #5
- 80002ee: 428b cmp r3, r1
- 80002f0: d301 bcc.n 80002f6 <__divsi3+0xc6>
- 80002f2: 014b lsls r3, r1, #5
- 80002f4: 1ac0 subs r0, r0, r3
- 80002f6: 4152 adcs r2, r2
- 80002f8: 0903 lsrs r3, r0, #4
- 80002fa: 428b cmp r3, r1
- 80002fc: d301 bcc.n 8000302 <__divsi3+0xd2>
- 80002fe: 010b lsls r3, r1, #4
- 8000300: 1ac0 subs r0, r0, r3
- 8000302: 4152 adcs r2, r2
- 8000304: 08c3 lsrs r3, r0, #3
- 8000306: 428b cmp r3, r1
- 8000308: d301 bcc.n 800030e <__divsi3+0xde>
- 800030a: 00cb lsls r3, r1, #3
- 800030c: 1ac0 subs r0, r0, r3
- 800030e: 4152 adcs r2, r2
- 8000310: 0883 lsrs r3, r0, #2
- 8000312: 428b cmp r3, r1
- 8000314: d301 bcc.n 800031a <__divsi3+0xea>
- 8000316: 008b lsls r3, r1, #2
- 8000318: 1ac0 subs r0, r0, r3
- 800031a: 4152 adcs r2, r2
- 800031c: 0843 lsrs r3, r0, #1
- 800031e: 428b cmp r3, r1
- 8000320: d301 bcc.n 8000326 <__divsi3+0xf6>
- 8000322: 004b lsls r3, r1, #1
- 8000324: 1ac0 subs r0, r0, r3
- 8000326: 4152 adcs r2, r2
- 8000328: 1a41 subs r1, r0, r1
- 800032a: d200 bcs.n 800032e <__divsi3+0xfe>
- 800032c: 4601 mov r1, r0
- 800032e: 4152 adcs r2, r2
- 8000330: 4610 mov r0, r2
- 8000332: 4770 bx lr
- 8000334: e05d b.n 80003f2 <__divsi3+0x1c2>
- 8000336: 0fca lsrs r2, r1, #31
- 8000338: d000 beq.n 800033c <__divsi3+0x10c>
- 800033a: 4249 negs r1, r1
- 800033c: 1003 asrs r3, r0, #32
- 800033e: d300 bcc.n 8000342 <__divsi3+0x112>
- 8000340: 4240 negs r0, r0
- 8000342: 4053 eors r3, r2
- 8000344: 2200 movs r2, #0
- 8000346: 469c mov ip, r3
- 8000348: 0903 lsrs r3, r0, #4
- 800034a: 428b cmp r3, r1
- 800034c: d32d bcc.n 80003aa <__divsi3+0x17a>
- 800034e: 0a03 lsrs r3, r0, #8
- 8000350: 428b cmp r3, r1
- 8000352: d312 bcc.n 800037a <__divsi3+0x14a>
- 8000354: 22fc movs r2, #252 @ 0xfc
- 8000356: 0189 lsls r1, r1, #6
- 8000358: ba12 rev r2, r2
- 800035a: 0a03 lsrs r3, r0, #8
- 800035c: 428b cmp r3, r1
- 800035e: d30c bcc.n 800037a <__divsi3+0x14a>
- 8000360: 0189 lsls r1, r1, #6
- 8000362: 1192 asrs r2, r2, #6
- 8000364: 428b cmp r3, r1
- 8000366: d308 bcc.n 800037a <__divsi3+0x14a>
- 8000368: 0189 lsls r1, r1, #6
- 800036a: 1192 asrs r2, r2, #6
- 800036c: 428b cmp r3, r1
- 800036e: d304 bcc.n 800037a <__divsi3+0x14a>
- 8000370: 0189 lsls r1, r1, #6
- 8000372: d03a beq.n 80003ea <__divsi3+0x1ba>
- 8000374: 1192 asrs r2, r2, #6
- 8000376: e000 b.n 800037a <__divsi3+0x14a>
- 8000378: 0989 lsrs r1, r1, #6
- 800037a: 09c3 lsrs r3, r0, #7
- 800037c: 428b cmp r3, r1
- 800037e: d301 bcc.n 8000384 <__divsi3+0x154>
- 8000380: 01cb lsls r3, r1, #7
- 8000382: 1ac0 subs r0, r0, r3
- 8000384: 4152 adcs r2, r2
- 8000386: 0983 lsrs r3, r0, #6
- 8000388: 428b cmp r3, r1
- 800038a: d301 bcc.n 8000390 <__divsi3+0x160>
- 800038c: 018b lsls r3, r1, #6
- 800038e: 1ac0 subs r0, r0, r3
- 8000390: 4152 adcs r2, r2
- 8000392: 0943 lsrs r3, r0, #5
- 8000394: 428b cmp r3, r1
- 8000396: d301 bcc.n 800039c <__divsi3+0x16c>
- 8000398: 014b lsls r3, r1, #5
- 800039a: 1ac0 subs r0, r0, r3
- 800039c: 4152 adcs r2, r2
- 800039e: 0903 lsrs r3, r0, #4
- 80003a0: 428b cmp r3, r1
- 80003a2: d301 bcc.n 80003a8 <__divsi3+0x178>
- 80003a4: 010b lsls r3, r1, #4
- 80003a6: 1ac0 subs r0, r0, r3
- 80003a8: 4152 adcs r2, r2
- 80003aa: 08c3 lsrs r3, r0, #3
- 80003ac: 428b cmp r3, r1
- 80003ae: d301 bcc.n 80003b4 <__divsi3+0x184>
- 80003b0: 00cb lsls r3, r1, #3
- 80003b2: 1ac0 subs r0, r0, r3
- 80003b4: 4152 adcs r2, r2
- 80003b6: 0883 lsrs r3, r0, #2
- 80003b8: 428b cmp r3, r1
- 80003ba: d301 bcc.n 80003c0 <__divsi3+0x190>
- 80003bc: 008b lsls r3, r1, #2
- 80003be: 1ac0 subs r0, r0, r3
- 80003c0: 4152 adcs r2, r2
- 80003c2: d2d9 bcs.n 8000378 <__divsi3+0x148>
- 80003c4: 0843 lsrs r3, r0, #1
- 80003c6: 428b cmp r3, r1
- 80003c8: d301 bcc.n 80003ce <__divsi3+0x19e>
- 80003ca: 004b lsls r3, r1, #1
- 80003cc: 1ac0 subs r0, r0, r3
- 80003ce: 4152 adcs r2, r2
- 80003d0: 1a41 subs r1, r0, r1
- 80003d2: d200 bcs.n 80003d6 <__divsi3+0x1a6>
- 80003d4: 4601 mov r1, r0
- 80003d6: 4663 mov r3, ip
- 80003d8: 4152 adcs r2, r2
- 80003da: 105b asrs r3, r3, #1
- 80003dc: 4610 mov r0, r2
- 80003de: d301 bcc.n 80003e4 <__divsi3+0x1b4>
- 80003e0: 4240 negs r0, r0
- 80003e2: 2b00 cmp r3, #0
- 80003e4: d500 bpl.n 80003e8 <__divsi3+0x1b8>
- 80003e6: 4249 negs r1, r1
- 80003e8: 4770 bx lr
- 80003ea: 4663 mov r3, ip
- 80003ec: 105b asrs r3, r3, #1
- 80003ee: d300 bcc.n 80003f2 <__divsi3+0x1c2>
- 80003f0: 4240 negs r0, r0
- 80003f2: b501 push {r0, lr}
- 80003f4: 2000 movs r0, #0
- 80003f6: f000 f805 bl 8000404 <__aeabi_idiv0>
- 80003fa: bd02 pop {r1, pc}
-
-080003fc <__aeabi_idivmod>:
- 80003fc: 2900 cmp r1, #0
- 80003fe: d0f8 beq.n 80003f2 <__divsi3+0x1c2>
- 8000400: e716 b.n 8000230 <__divsi3>
- 8000402: 4770 bx lr
-
-08000404 <__aeabi_idiv0>:
- 8000404: 4770 bx lr
- 8000406: 46c0 nop @ (mov r8, r8)
-
-08000408 :
-/**
- * @brief The application entry point.
- * @retval int
- */
-int main(void)
-{
- 8000408: b580 push {r7, lr}
- 800040a: af00 add r7, sp, #0
- /* USER CODE END 1 */
+ 8000100: 200001e0 .word 0x200001e0
+ 8000104: 080072c4 .word 0x080072c4
- /* MCU Configuration--------------------------------------------------------*/
-
- /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
- HAL_Init();
- 800040c: f000 fd14 bl 8000e38
- /* USER CODE BEGIN Init */
-
- /* USER CODE END Init */
-
- /* Configure the system clock */
- SystemClock_Config();
- 8000410: f000 f846 bl 80004a0
- /* USER CODE BEGIN SysInit */
-
- /* USER CODE END SysInit */
-
- /* Initialize all configured peripherals */
- MX_GPIO_Init();
- 8000414: f000 f8d0 bl 80005b8
- MX_USART1_UART_Init();
- 8000418: f000 f880 bl 800051c
- /* USER CODE BEGIN 2 */
+08000108 :
+ return node;
+}
- /* USER CODE END 2 */
+/* Delete a cJSON structure. */
+CJSON_PUBLIC(void) cJSON_Delete(cJSON *item)
+{
+ 8000108: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
+ cJSON *next = NULL;
+ while (item != NULL)
+ {
+ next = item->next;
+ if (!(item->type & cJSON_IsReference) && (item->child != NULL))
+ 800010a: 2680 movs r6, #128 @ 0x80
+ if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
+ {
+ global_hooks.deallocate(item->valuestring);
+ item->valuestring = NULL;
+ }
+ if (!(item->type & cJSON_StringIsConst) && (item->string != NULL))
+ 800010c: 2780 movs r7, #128 @ 0x80
+{
+ 800010e: 0004 movs r4, r0
+ if (!(item->type & cJSON_IsReference) && (item->child != NULL))
+ 8000110: 0076 lsls r6, r6, #1
+ if (!(item->type & cJSON_StringIsConst) && (item->string != NULL))
+ 8000112: 00bf lsls r7, r7, #2
+ while (item != NULL)
+ 8000114: 2c00 cmp r4, #0
+ 8000116: d100 bne.n 800011a
+ item->string = NULL;
+ }
+ global_hooks.deallocate(item);
+ item = next;
+ }
+}
+ 8000118: bdf7 pop {r0, r1, r2, r4, r5, r6, r7, pc}
+ next = item->next;
+ 800011a: 6823 ldr r3, [r4, #0]
+ 800011c: 4d13 ldr r5, [pc, #76] @ (800016c )
+ 800011e: 9300 str r3, [sp, #0]
+ if (!(item->type & cJSON_IsReference) && (item->child != NULL))
+ 8000120: 68e3 ldr r3, [r4, #12]
+ 8000122: 4233 tst r3, r6
+ 8000124: d106 bne.n 8000134
+ 8000126: 68a0 ldr r0, [r4, #8]
+ 8000128: 2800 cmp r0, #0
+ 800012a: d115 bne.n 8000158
+ if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
+ 800012c: 6920 ldr r0, [r4, #16]
+ global_hooks.deallocate(item->valuestring);
+ 800012e: 686b ldr r3, [r5, #4]
+ if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
+ 8000130: 2800 cmp r0, #0
+ 8000132: d117 bne.n 8000164
+ if (!(item->type & cJSON_StringIsConst) && (item->string != NULL))
+ 8000134: 68e3 ldr r3, [r4, #12]
+ 8000136: 001a movs r2, r3
+ 8000138: 403a ands r2, r7
+ 800013a: 9201 str r2, [sp, #4]
+ 800013c: 423b tst r3, r7
+ 800013e: d106 bne.n 800014e
+ 8000140: 6a20 ldr r0, [r4, #32]
+ 8000142: 2800 cmp r0, #0
+ 8000144: d003 beq.n 800014e
+ global_hooks.deallocate(item->string);
+ 8000146: 686b ldr r3, [r5, #4]
+ 8000148: 4798 blx r3
+ item->string = NULL;
+ 800014a: 9b01 ldr r3, [sp, #4]
+ 800014c: 6223 str r3, [r4, #32]
+ global_hooks.deallocate(item);
+ 800014e: 0020 movs r0, r4
+ 8000150: 686b ldr r3, [r5, #4]
+ 8000152: 4798 blx r3
+ item = next;
+ 8000154: 9c00 ldr r4, [sp, #0]
+ 8000156: e7dd b.n 8000114
+ cJSON_Delete(item->child);
+ 8000158: f7ff ffd6 bl 8000108
+ if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
+ 800015c: 68e3 ldr r3, [r4, #12]
+ 800015e: 4233 tst r3, r6
+ 8000160: d0e4 beq.n 800012c
+ 8000162: e7e7 b.n 8000134
+ global_hooks.deallocate(item->valuestring);
+ 8000164: 4798 blx r3
+ item->valuestring = NULL;
+ 8000166: 2300 movs r3, #0
+ 8000168: 6123 str r3, [r4, #16]
+ 800016a: e7e3 b.n 8000134
+ 800016c: 20000000 .word 0x20000000
+
+08000170 :
+static unsigned parse_hex4(const unsigned char * const input)
+{
+ unsigned int h = 0;
+ size_t i = 0;
- /* Initialize leds */
- BSP_LED_Init(LED_GREEN);
- 800041c: 2000 movs r0, #0
- 800041e: f000 fabb bl 8000998
+ for (i = 0; i < 4; i++)
+ 8000170: 2300 movs r3, #0
+{
+ 8000172: 0001 movs r1, r0
+ unsigned int h = 0;
+ 8000174: 0018 movs r0, r3
+{
+ 8000176: b510 push {r4, lr}
+ {
+ /* parse digit */
+ if ((input[i] >= '0') && (input[i] <= '9'))
+ 8000178: 5cca ldrb r2, [r1, r3]
+ 800017a: 0014 movs r4, r2
+ 800017c: 3c30 subs r4, #48 @ 0x30
+ 800017e: 2c09 cmp r4, #9
+ 8000180: d809 bhi.n 8000196
+ {
+ h += (unsigned int) input[i] - '0';
+ 8000182: 3830 subs r0, #48 @ 0x30
+ {
+ h += (unsigned int) 10 + input[i] - 'A';
+ }
+ else if ((input[i] >= 'a') && (input[i] <= 'f'))
+ {
+ h += (unsigned int) 10 + input[i] - 'a';
+ 8000184: 1810 adds r0, r2, r0
+ else /* invalid */
+ {
+ return 0;
+ }
+
+ if (i < 3)
+ 8000186: 1c5a adds r2, r3, #1
+ 8000188: 2b03 cmp r3, #3
+ 800018a: d003 beq.n 8000194
+ for (i = 0; i < 4; i++)
+ 800018c: 0013 movs r3, r2
+ {
+ /* shift left to make place for the next nibble */
+ h = h << 4;
+ 800018e: 0100 lsls r0, r0, #4
+ for (i = 0; i < 4; i++)
+ 8000190: 2a04 cmp r2, #4
+ 8000192: d1f1 bne.n 8000178
+ }
+ }
- /* Initialize USER push-button, will be used to trigger an interrupt each time it's pressed.*/
- BSP_PB_Init(BUTTON_USER, BUTTON_MODE_EXTI);
- 8000422: 2101 movs r1, #1
- 8000424: 2000 movs r0, #0
- 8000426: f000 fb89 bl 8000b3c
+ return h;
+}
+ 8000194: bd10 pop {r4, pc}
+ else if ((input[i] >= 'A') && (input[i] <= 'F'))
+ 8000196: 0014 movs r4, r2
+ 8000198: 3c41 subs r4, #65 @ 0x41
+ 800019a: 2c05 cmp r4, #5
+ 800019c: d801 bhi.n 80001a2
+ h += (unsigned int) 10 + input[i] - 'A';
+ 800019e: 3837 subs r0, #55 @ 0x37
+ 80001a0: e7f0 b.n 8000184
+ else if ((input[i] >= 'a') && (input[i] <= 'f'))
+ 80001a2: 0014 movs r4, r2
+ 80001a4: 3c61 subs r4, #97 @ 0x61
+ 80001a6: 2c05 cmp r4, #5
+ 80001a8: d801 bhi.n 80001ae
+ h += (unsigned int) 10 + input[i] - 'a';
+ 80001aa: 3857 subs r0, #87 @ 0x57
+ 80001ac: e7ea b.n 8000184
+ return 0;
+ 80001ae: 2000 movs r0, #0
+ 80001b0: e7f0 b.n 8000194
+
+080001b2 :
+ return 0;
+}
- /* Initialize COM1 port (115200, 8 bits (7-bit data + 1 stop bit), no parity */
- BspCOMInit.BaudRate = 9600;
- 800042a: 4b18 ldr r3, [pc, #96] @ (800048c )
- 800042c: 2296 movs r2, #150 @ 0x96
- 800042e: 0192 lsls r2, r2, #6
- 8000430: 601a str r2, [r3, #0]
- BspCOMInit.WordLength = COM_WORDLENGTH_8B;
- 8000432: 4b16 ldr r3, [pc, #88] @ (800048c )
- 8000434: 2200 movs r2, #0
- 8000436: 605a str r2, [r3, #4]
- BspCOMInit.StopBits = COM_STOPBITS_1;
- 8000438: 4b14 ldr r3, [pc, #80] @ (800048c )
- 800043a: 2200 movs r2, #0
- 800043c: 811a strh r2, [r3, #8]
- BspCOMInit.Parity = COM_PARITY_NONE;
- 800043e: 4b13 ldr r3, [pc, #76] @ (800048c )
- 8000440: 2200 movs r2, #0
- 8000442: 815a strh r2, [r3, #10]
- BspCOMInit.HwFlowCtl = COM_HWCONTROL_NONE;
- 8000444: 4b11 ldr r3, [pc, #68] @ (800048c )
- 8000446: 2200 movs r2, #0
- 8000448: 819a strh r2, [r3, #12]
- if (BSP_COM_Init(COM1, &BspCOMInit) != BSP_ERROR_NONE)
- 800044a: 4b10 ldr r3, [pc, #64] @ (800048c )
- 800044c: 0019 movs r1, r3
- 800044e: 2000 movs r0, #0
- 8000450: f000 fc10 bl 8000c74
- 8000454: 1e03 subs r3, r0, #0
- 8000456: d001 beq.n 800045c
- {
- Error_Handler();
- 8000458: f000 f90c bl 8000674
- }
+/* Parse the input text into an unescaped cinput, and populate item. */
+static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_buffer)
+{
+ 80001b2: b5f0 push {r4, r5, r6, r7, lr}
+ const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1;
+ 80001b4: 680b ldr r3, [r1, #0]
+ 80001b6: 688a ldr r2, [r1, #8]
+{
+ 80001b8: b085 sub sp, #20
+ const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1;
+ 80001ba: 1c54 adds r4, r2, #1
+{
+ 80001bc: 9003 str r0, [sp, #12]
+ const unsigned char *input_end = buffer_at_offset(input_buffer) + 1;
+ unsigned char *output_pointer = NULL;
+ unsigned char *output = NULL;
+
+ /* not a string */
+ if (buffer_at_offset(input_buffer)[0] != '\"')
+ 80001be: 1898 adds r0, r3, r2
+ 80001c0: 5c9a ldrb r2, [r3, r2]
+{
+ 80001c2: 000e movs r6, r1
+ const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1;
+ 80001c4: 191c adds r4, r3, r4
+ if (buffer_at_offset(input_buffer)[0] != '\"')
+ 80001c6: 2a22 cmp r2, #34 @ 0x22
+ 80001c8: d000 beq.n 80001cc
+ 80001ca: e0dd b.n 8000388
+ const unsigned char *input_end = buffer_at_offset(input_buffer) + 1;
+ 80001cc: 0027 movs r7, r4
+ }
- /* USER CODE BEGIN BSP */
+ {
+ /* calculate approximate size of the output (overestimate) */
+ size_t allocation_length = 0;
+ size_t skipped_bytes = 0;
+ 80001ce: 2200 movs r2, #0
+ while (((size_t)(input_end - input_buffer->content) < input_buffer->length) && (*input_end != '\"'))
+ 80001d0: 684d ldr r5, [r1, #4]
+ 80001d2: 1af9 subs r1, r7, r3
+ 80001d4: 42a9 cmp r1, r5
+ 80001d6: d300 bcc.n 80001da
+ 80001d8: e0d6 b.n 8000388
+ 80001da: 7839 ldrb r1, [r7, #0]
+ 80001dc: 2922 cmp r1, #34 @ 0x22
+ 80001de: d11a bne.n 8000216
+ {
+ goto fail; /* string ended unexpectedly */
+ }
+
+ /* This is at most how much we need for the output */
+ allocation_length = (size_t) (input_end - buffer_at_offset(input_buffer)) - skipped_bytes;
+ 80001e0: 1a38 subs r0, r7, r0
+ output = (unsigned char*)input_buffer->hooks.allocate(allocation_length + sizeof(""));
+ 80001e2: 1a80 subs r0, r0, r2
+ 80001e4: 6933 ldr r3, [r6, #16]
+ 80001e6: 3001 adds r0, #1
+ 80001e8: 4798 blx r3
+ if (output == NULL)
+ 80001ea: 1e03 subs r3, r0, #0
+ output = (unsigned char*)input_buffer->hooks.allocate(allocation_length + sizeof(""));
+ 80001ec: 9001 str r0, [sp, #4]
+ if (output == NULL)
+ 80001ee: d100 bne.n 80001f2
+ 80001f0: e0ca b.n 8000388
+ *output_pointer++ = *input_pointer++;
+ }
+ /* escape sequence */
+ else
+ {
+ unsigned char sequence_length = 2;
+ 80001f2: 001d movs r5, r3
+ while (input_pointer < input_end)
+ 80001f4: 42bc cmp r4, r7
+ 80001f6: d318 bcc.n 800022a
+ input_pointer += sequence_length;
+ }
+ }
- /* -- Sample board code to send message over COM1 port ---- */
- printf("Welcome to STM32 world !\n\r");
- 800045c: 4b0c ldr r3, [pc, #48] @ (8000490 )
- 800045e: 0018 movs r0, r3
- 8000460: f003 fe74 bl 800414c
+ /* zero terminate the output */
+ *output_pointer = '\0';
+ 80001f8: 2300 movs r3, #0
+
+ item->type = cJSON_String;
+ 80001fa: 9a03 ldr r2, [sp, #12]
+ *output_pointer = '\0';
+ 80001fc: 702b strb r3, [r5, #0]
+ item->type = cJSON_String;
+ 80001fe: 3310 adds r3, #16
+ 8000200: 60d3 str r3, [r2, #12]
+ item->valuestring = (char*)output;
+ 8000202: 0013 movs r3, r2
+
+ input_buffer->offset = (size_t) (input_end - input_buffer->content);
+ input_buffer->offset++;
+
+ return true;
+ 8000204: 2001 movs r0, #1
+ item->valuestring = (char*)output;
+ 8000206: 9a01 ldr r2, [sp, #4]
+ 8000208: 611a str r2, [r3, #16]
+ input_buffer->offset = (size_t) (input_end - input_buffer->content);
+ 800020a: 6833 ldr r3, [r6, #0]
+ 800020c: 1afb subs r3, r7, r3
+ input_buffer->offset++;
+ 800020e: 3301 adds r3, #1
+ 8000210: 60b3 str r3, [r6, #8]
+ {
+ input_buffer->offset = (size_t)(input_pointer - input_buffer->content);
+ }
- /* -- Sample board code to switch on leds ---- */
- BSP_LED_On(LED_GREEN);
- 8000464: 2000 movs r0, #0
- 8000466: f000 fb01 bl 8000a6c
- while (1)
- {
-// HAL_UART_Transmit(&huart1, tx_buffer, 27, 100);
-// HAL_Delay(1000);
- /* -- Sample board code for User push-button in interrupt mode ---- */
- HAL_UART_Receive_IT(&huart1, rx_data, 6);
- 800046a: 490a ldr r1, [pc, #40] @ (8000494 )
- 800046c: 4b0a ldr r3, [pc, #40] @ (8000498 )
- 800046e: 2206 movs r2, #6
- 8000470: 0018 movs r0, r3
- 8000472: f001 fea9 bl 80021c8
+ return false;
+}
+ 8000212: b005 add sp, #20
+ 8000214: bdf0 pop {r4, r5, r6, r7, pc}
+ if (input_end[0] == '\\')
+ 8000216: 295c cmp r1, #92 @ 0x5c
+ 8000218: d105 bne.n 8000226
+ if ((size_t)(input_end + 1 - input_buffer->content) >= input_buffer->length)
+ 800021a: 3701 adds r7, #1
+ 800021c: 1af9 subs r1, r7, r3
+ 800021e: 428d cmp r5, r1
+ 8000220: d800 bhi.n 8000224
+ 8000222: e0b1 b.n 8000388
+ skipped_bytes++;
+ 8000224: 3201 adds r2, #1
+ input_end++;
+ 8000226: 3701 adds r7, #1
+ 8000228: e7d3 b.n 80001d2
+ if (*input_pointer != '\\')
+ 800022a: 7820 ldrb r0, [r4, #0]
+ 800022c: 285c cmp r0, #92 @ 0x5c
+ 800022e: d003 beq.n 8000238
+ *output_pointer++ = *input_pointer++;
+ 8000230: 3401 adds r4, #1
+ 8000232: 1c6b adds r3, r5, #1
+ 8000234: 7028 strb r0, [r5, #0]
+ 8000236: e7dc b.n 80001f2
+ switch (input_pointer[1])
+ 8000238: 7860 ldrb r0, [r4, #1]
+ 800023a: 2875 cmp r0, #117 @ 0x75
+ 800023c: d80a bhi.n 8000254
+ 800023e: 286d cmp r0, #109 @ 0x6d
+ 8000240: d80f bhi.n 8000262
+ 8000242: 2862 cmp r0, #98 @ 0x62
+ 8000244: d01b beq.n 800027e
+ 8000246: d815 bhi.n 8000274
+ 8000248: 282f cmp r0, #47 @ 0x2f
+ 800024a: d026 beq.n 800029a
+ 800024c: 285c cmp r0, #92 @ 0x5c
+ 800024e: d024 beq.n 800029a
+ 8000250: 2822 cmp r0, #34 @ 0x22
+ 8000252: d022 beq.n 800029a
+ input_buffer->hooks.deallocate(output);
+ 8000254: 6973 ldr r3, [r6, #20]
+ 8000256: 9801 ldr r0, [sp, #4]
+ 8000258: 4798 blx r3
+ input_buffer->offset = (size_t)(input_pointer - input_buffer->content);
+ 800025a: 6833 ldr r3, [r6, #0]
+ 800025c: 1ae4 subs r4, r4, r3
+ 800025e: 60b4 str r4, [r6, #8]
+ 8000260: e095 b.n 800038e
+ switch (input_pointer[1])
+ 8000262: 386e subs r0, #110 @ 0x6e
+ 8000264: 2807 cmp r0, #7
+ 8000266: d8f5 bhi.n 8000254
+ 8000268: f003 fd52 bl 8003d10 <__gnu_thumb1_case_sqi>
+ 800026c: f4f4f40e .word 0xf4f4f40e
+ 8000270: 1914f411 .word 0x1914f411
+ 8000274: 2866 cmp r0, #102 @ 0x66
+ 8000276: d1ed bne.n 8000254
+ break;
+ 8000278: 200c movs r0, #12
+ *output_pointer++ = '\f';
+ 800027a: 1c6b adds r3, r5, #1
+ break;
+ 800027c: e001 b.n 8000282
+ break;
+ 800027e: 2008 movs r0, #8
+ *output_pointer++ = '\b';
+ 8000280: 1c6b adds r3, r5, #1
+ unsigned char sequence_length = 2;
+ 8000282: 2202 movs r2, #2
+ input_pointer += sequence_length;
+ 8000284: 18a4 adds r4, r4, r2
+ 8000286: e7d5 b.n 8000234
+ break;
+ 8000288: 200a movs r0, #10
+ *output_pointer++ = '\n';
+ 800028a: 1c6b adds r3, r5, #1
+ break;
+ 800028c: e7f9 b.n 8000282
+ break;
+ 800028e: 200d movs r0, #13
+ *output_pointer++ = '\r';
+ 8000290: 1c6b adds r3, r5, #1
+ break;
+ 8000292: e7f6 b.n 8000282
+ break;
+ 8000294: 2009 movs r0, #9
+ *output_pointer++ = '\t';
+ 8000296: 1c6b adds r3, r5, #1
+ break;
+ 8000298: e7f3 b.n 8000282
+ *output_pointer++ = input_pointer[1];
+ 800029a: 1c6b adds r3, r5, #1
+ break;
+ 800029c: e7f1 b.n 8000282
+ if ((input_end - first_sequence) < 6)
+ 800029e: 1b3b subs r3, r7, r4
+ 80002a0: 2b05 cmp r3, #5
+ 80002a2: ddd7 ble.n 8000254
+ first_code = parse_hex4(first_sequence + 2);
+ 80002a4: 1ca0 adds r0, r4, #2
+ 80002a6: f7ff ff63 bl 8000170
+ if (((first_code >= 0xDC00) && (first_code <= 0xDFFF)))
+ 80002aa: 2280 movs r2, #128 @ 0x80
+ 80002ac: 4b39 ldr r3, [pc, #228] @ (8000394 )
+ first_code = parse_hex4(first_sequence + 2);
+ 80002ae: 9000 str r0, [sp, #0]
+ if (((first_code >= 0xDC00) && (first_code <= 0xDFFF)))
+ 80002b0: 18c3 adds r3, r0, r3
+ 80002b2: 00d2 lsls r2, r2, #3
+ 80002b4: 4293 cmp r3, r2
+ 80002b6: d3cd bcc.n 8000254
+ if ((first_code >= 0xD800) && (first_code <= 0xDBFF))
+ 80002b8: 0001 movs r1, r0
+ 80002ba: 4837 ldr r0, [pc, #220] @ (8000398 )
+ 80002bc: 180b adds r3, r1, r0
+ 80002be: 4293 cmp r3, r2
+ 80002c0: d232 bcs.n 8000328
+ const unsigned char *second_sequence = first_sequence + 6;
+ 80002c2: 1da3 adds r3, r4, #6
+ if ((input_end - second_sequence) < 6)
+ 80002c4: 1afb subs r3, r7, r3
+ 80002c6: 2b05 cmp r3, #5
+ 80002c8: ddc4 ble.n 8000254
+ if ((second_sequence[0] != '\\') || (second_sequence[1] != 'u'))
+ 80002ca: 79a3 ldrb r3, [r4, #6]
+ 80002cc: 2b5c cmp r3, #92 @ 0x5c
+ 80002ce: d1c1 bne.n 8000254
+ 80002d0: 79e3 ldrb r3, [r4, #7]
+ 80002d2: 2b75 cmp r3, #117 @ 0x75
+ 80002d4: d1be bne.n 8000254
+ second_code = parse_hex4(second_sequence + 2);
+ 80002d6: 0020 movs r0, r4
+ 80002d8: 3008 adds r0, #8
+ 80002da: f7ff ff49 bl 8000170
+ if ((second_code < 0xDC00) || (second_code > 0xDFFF))
+ 80002de: 2280 movs r2, #128 @ 0x80
+ 80002e0: 4b2c ldr r3, [pc, #176] @ (8000394 )
+ 80002e2: 00d2 lsls r2, r2, #3
+ 80002e4: 18c3 adds r3, r0, r3
+ 80002e6: 4293 cmp r3, r2
+ 80002e8: d2b4 bcs.n 8000254
+ codepoint = 0x10000 + (((first_code & 0x3FF) << 10) | (second_code & 0x3FF));
+ 80002ea: 9b00 ldr r3, [sp, #0]
+ 80002ec: 4a2b ldr r2, [pc, #172] @ (800039c )
+ 80002ee: 029b lsls r3, r3, #10
+ 80002f0: 4013 ands r3, r2
+ 80002f2: 2280 movs r2, #128 @ 0x80
+ 80002f4: 0580 lsls r0, r0, #22
+ 80002f6: 0d80 lsrs r0, r0, #22
+ 80002f8: 0252 lsls r2, r2, #9
+ 80002fa: 4303 orrs r3, r0
+ 80002fc: 189b adds r3, r3, r2
+ sequence_length = 12; /* \uXXXX\uXXXX */
+ 80002fe: 220c movs r2, #12
+ codepoint = 0x10000 + (((first_code & 0x3FF) << 10) | (second_code & 0x3FF));
+ 8000300: 9300 str r3, [sp, #0]
+ first_byte_mark = 0xF0; /* 11110000 */
+ 8000302: 23f0 movs r3, #240 @ 0xf0
+ 8000304: 469c mov ip, r3
+ utf8_length = 4;
+ 8000306: 3bec subs r3, #236 @ 0xec
+ for (utf8_position = (unsigned char)(utf8_length - 1); utf8_position > 0; utf8_position--)
+ 8000308: 1e59 subs r1, r3, #1
+ 800030a: b2c9 uxtb r1, r1
+ 800030c: 1869 adds r1, r5, r1
+ 800030e: 9102 str r1, [sp, #8]
+ (*output_pointer)[utf8_position] = (unsigned char)((codepoint | 0x80) & 0xBF);
+ 8000310: 4669 mov r1, sp
+ 8000312: 7808 ldrb r0, [r1, #0]
+ for (utf8_position = (unsigned char)(utf8_length - 1); utf8_position > 0; utf8_position--)
+ 8000314: 9902 ldr r1, [sp, #8]
+ 8000316: 428d cmp r5, r1
+ 8000318: d127 bne.n 800036a
+ if (utf8_length > 1)
+ 800031a: 2b01 cmp r3, #1
+ 800031c: d031 beq.n 8000382
+ (*output_pointer)[0] = (unsigned char)((codepoint | first_byte_mark) & 0xFF);
+ 800031e: 4661 mov r1, ip
+ 8000320: 4301 orrs r1, r0
+ 8000322: 0008 movs r0, r1
+ *output_pointer += utf8_length;
+ 8000324: 18eb adds r3, r5, r3
+ if (sequence_length == 0)
+ 8000326: e7ad b.n 8000284
+ if (codepoint < 0x80)
+ 8000328: 9b00 ldr r3, [sp, #0]
+ 800032a: 2b7f cmp r3, #127 @ 0x7f
+ 800032c: d90e bls.n 800034c
+ else if (codepoint < 0x800)
+ 800032e: 2380 movs r3, #128 @ 0x80
+ 8000330: 9a00 ldr r2, [sp, #0]
+ 8000332: 011b lsls r3, r3, #4
+ 8000334: 429a cmp r2, r3
+ 8000336: d30e bcc.n 8000356
+ else if (codepoint < 0x10000)
+ 8000338: 2380 movs r3, #128 @ 0x80
+ 800033a: 025b lsls r3, r3, #9
+ 800033c: 429a cmp r2, r3
+ 800033e: d30f bcc.n 8000360
+ else if (codepoint <= 0x10FFFF)
+ 8000340: 2388 movs r3, #136 @ 0x88
+ 8000342: 035b lsls r3, r3, #13
+ 8000344: 429a cmp r2, r3
+ 8000346: d285 bcs.n 8000254
+ sequence_length = 6; /* \uXXXX */
+ 8000348: 2206 movs r2, #6
+ 800034a: e7da b.n 8000302
+ unsigned char first_byte_mark = 0;
+ 800034c: 2300 movs r3, #0
+ sequence_length = 6; /* \uXXXX */
+ 800034e: 2206 movs r2, #6
+ unsigned char first_byte_mark = 0;
+ 8000350: 469c mov ip, r3
+ utf8_length = 1;
+ 8000352: 3301 adds r3, #1
+ 8000354: e7d8 b.n 8000308
+ first_byte_mark = 0xC0; /* 11000000 */
+ 8000356: 23c0 movs r3, #192 @ 0xc0
+ sequence_length = 6; /* \uXXXX */
+ 8000358: 2206 movs r2, #6
+ first_byte_mark = 0xC0; /* 11000000 */
+ 800035a: 469c mov ip, r3
+ utf8_length = 2;
+ 800035c: 3bbe subs r3, #190 @ 0xbe
+ 800035e: e7d3 b.n 8000308
+ first_byte_mark = 0xE0; /* 11100000 */
+ 8000360: 23e0 movs r3, #224 @ 0xe0
+ sequence_length = 6; /* \uXXXX */
+ 8000362: 2206 movs r2, #6
+ first_byte_mark = 0xE0; /* 11100000 */
+ 8000364: 469c mov ip, r3
+ utf8_length = 3;
+ 8000366: 3bdd subs r3, #221 @ 0xdd
+ 8000368: e7ce b.n 8000308
+ (*output_pointer)[utf8_position] = (unsigned char)((codepoint | 0x80) & 0xBF);
+ 800036a: 213f movs r1, #63 @ 0x3f
+ 800036c: 4008 ands r0, r1
+ 800036e: 39bf subs r1, #191 @ 0xbf
+ 8000370: 4308 orrs r0, r1
+ 8000372: 9902 ldr r1, [sp, #8]
+ 8000374: 7008 strb r0, [r1, #0]
+ codepoint >>= 6;
+ 8000376: 9900 ldr r1, [sp, #0]
+ 8000378: 0989 lsrs r1, r1, #6
+ 800037a: 9100 str r1, [sp, #0]
+ for (utf8_position = (unsigned char)(utf8_length - 1); utf8_position > 0; utf8_position--)
+ 800037c: 9902 ldr r1, [sp, #8]
+ 800037e: 3901 subs r1, #1
+ 8000380: e7c5 b.n 800030e
+ (*output_pointer)[0] = (unsigned char)(codepoint & 0x7F);
+ 8000382: 217f movs r1, #127 @ 0x7f
+ 8000384: 4008 ands r0, r1
+ 8000386: e7cd b.n 8000324
+ if (input_pointer != NULL)
+ 8000388: 2c00 cmp r4, #0
+ 800038a: d000 beq.n 800038e
+ 800038c: e765 b.n 800025a
+ return false;
+ 800038e: 2000 movs r0, #0
+ 8000390: e73f b.n 8000212
+ 8000392: 46c0 nop @ (mov r8, r8)
+ 8000394: ffff2400 .word 0xffff2400
+ 8000398: ffff2800 .word 0xffff2800
+ 800039c: 000ffc00 .word 0x000ffc00
+
+080003a0 :
+static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer);
+static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer);
+
+/* Utility to jump whitespace and cr/lf */
+static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer)
+{
+ 80003a0: b510 push {r4, lr}
+ if ((buffer == NULL) || (buffer->content == NULL))
+ 80003a2: 2800 cmp r0, #0
+ 80003a4: d006 beq.n 80003b4
+ 80003a6: 6801 ldr r1, [r0, #0]
+ 80003a8: 2900 cmp r1, #0
+ 80003aa: d010 beq.n 80003ce
+ {
+ return NULL;
+ }
- if (BspButtonState == BUTTON_PRESSED)
- 8000476: 4b09 ldr r3, [pc, #36] @ (800049c )
- 8000478: 681b ldr r3, [r3, #0]
- 800047a: 2b01 cmp r3, #1
- 800047c: d1f5 bne.n 800046a
+ if (cannot_access_at_index(buffer, 0))
+ 80003ac: 6843 ldr r3, [r0, #4]
+ 80003ae: 6882 ldr r2, [r0, #8]
+ 80003b0: 429a cmp r2, r3
+ 80003b2: d305 bcc.n 80003c0
{
- /* Update button state */
- BspButtonState = BUTTON_RELEASED;
- 800047e: 4b07 ldr r3, [pc, #28] @ (800049c )
- 8000480: 2200 movs r2, #0
- 8000482: 601a str r2, [r3, #0]
- /* -- Sample board code to toggle leds ---- */
- BSP_LED_Toggle(LED_GREEN);
- 8000484: 2000 movs r0, #0
- 8000486: f000 fb2f bl 8000ae8
- HAL_UART_Receive_IT(&huart1, rx_data, 6);
- 800048a: e7ee b.n 800046a
- 800048c: 2000009c .word 0x2000009c
- 8000490: 08004ea0 .word 0x08004ea0
- 8000494: 20000144 .word 0x20000144
- 8000498: 200000b0 .word 0x200000b0
- 800049c: 200000ac .word 0x200000ac
-
-080004a0 :
-/**
- * @brief System Clock Configuration
+ buffer->offset--;
+ }
+
+ return buffer;
+}
+ 80003b4: bd10 pop {r4, pc}
+ while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32))
+ 80003b6: 5c8c ldrb r4, [r1, r2]
+ 80003b8: 2c20 cmp r4, #32
+ 80003ba: d8fb bhi.n 80003b4
+ buffer->offset++;
+ 80003bc: 3201 adds r2, #1
+ 80003be: 6082 str r2, [r0, #8]
+ while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32))
+ 80003c0: 6882 ldr r2, [r0, #8]
+ 80003c2: 4293 cmp r3, r2
+ 80003c4: d8f7 bhi.n 80003b6
+ if (buffer->offset == buffer->length)
+ 80003c6: d1f5 bne.n 80003b4
+ buffer->offset--;
+ 80003c8: 3b01 subs r3, #1
+ 80003ca: 6083 str r3, [r0, #8]
+ 80003cc: e7f2 b.n 80003b4
+ return NULL;
+ 80003ce: 0008 movs r0, r1
+ 80003d0: e7f0 b.n 80003b4
+
+080003d2 :
+ * @param hdma DMA handle.
* @retval None
*/
-void SystemClock_Config(void)
+static void UART_DMAAbortOnError(DMA_HandleTypeDef *hdma)
{
- 80004a0: b590 push {r4, r7, lr}
- 80004a2: b08d sub sp, #52 @ 0x34
- 80004a4: af00 add r7, sp, #0
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- 80004a6: 2414 movs r4, #20
- 80004a8: 193b adds r3, r7, r4
- 80004aa: 0018 movs r0, r3
- 80004ac: 231c movs r3, #28
- 80004ae: 001a movs r2, r3
- 80004b0: 2100 movs r1, #0
- 80004b2: f003 fea7 bl 8004204
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- 80004b6: 003b movs r3, r7
- 80004b8: 0018 movs r0, r3
- 80004ba: 2314 movs r3, #20
- 80004bc: 001a movs r2, r3
- 80004be: 2100 movs r1, #0
- 80004c0: f003 fea0 bl 8004204
-
- /** Initializes the RCC Oscillators according to the specified parameters
- * in the RCC_OscInitTypeDef structure.
+ UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent);
+ 80003d2: 6a83 ldr r3, [r0, #40] @ 0x28
+ huart->RxXferCount = 0U;
+ 80003d4: 2200 movs r2, #0
+ 80003d6: 0019 movs r1, r3
+ huart->TxXferCount = 0U;
+ 80003d8: 3356 adds r3, #86 @ 0x56
+ huart->RxXferCount = 0U;
+ 80003da: 315e adds r1, #94 @ 0x5e
+ 80003dc: 800a strh r2, [r1, #0]
+ huart->TxXferCount = 0U;
+ 80003de: 801a strh r2, [r3, #0]
+ huart->ErrorCallback(huart);
+#else
+ /*Call legacy weak error callback*/
+ HAL_UART_ErrorCallback(huart);
+#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
+}
+ 80003e0: 4770 bx lr
+
+080003e2 :
*/
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
- 80004c4: 193b adds r3, r7, r4
- 80004c6: 2201 movs r2, #1
- 80004c8: 601a str r2, [r3, #0]
- RCC_OscInitStruct.HSEState = RCC_HSE_ON;
- 80004ca: 193b adds r3, r7, r4
- 80004cc: 2280 movs r2, #128 @ 0x80
- 80004ce: 0252 lsls r2, r2, #9
- 80004d0: 605a str r2, [r3, #4]
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- 80004d2: 193b adds r3, r7, r4
- 80004d4: 0018 movs r0, r3
- 80004d6: f001 f91f bl 8001718
- 80004da: 1e03 subs r3, r0, #0
- 80004dc: d001 beq.n 80004e2
+void BSP_PB_Callback(Button_TypeDef Button)
+{
+ if (Button == BUTTON_USER)
{
- Error_Handler();
- 80004de: f000 f8c9 bl 8000674
- }
-
- /** Initializes the CPU, AHB and APB buses clocks
+ BspButtonState = BUTTON_PRESSED;
+ 80003e2: 2201 movs r2, #1
+ 80003e4: 4b01 ldr r3, [pc, #4] @ (80003ec )
+ 80003e6: 601a str r2, [r3, #0]
+ * @retval BSP status
*/
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- 80004e2: 003b movs r3, r7
- 80004e4: 2207 movs r2, #7
- 80004e6: 601a str r2, [r3, #0]
- |RCC_CLOCKTYPE_PCLK1;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSE;
- 80004e8: 003b movs r3, r7
- 80004ea: 2201 movs r2, #1
- 80004ec: 605a str r2, [r3, #4]
- RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
- 80004ee: 003b movs r3, r7
- 80004f0: 2200 movs r2, #0
- 80004f2: 609a str r2, [r3, #8]
- RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV1;
- 80004f4: 003b movs r3, r7
- 80004f6: 2200 movs r2, #0
- 80004f8: 60da str r2, [r3, #12]
- RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV1;
- 80004fa: 003b movs r3, r7
- 80004fc: 2200 movs r2, #0
- 80004fe: 611a str r2, [r3, #16]
+static void BUTTON_USER_EXTI_Callback(void)
+{
+ BSP_PB_Callback(BUTTON_USER);
+}
+ 80003e8: 4770 bx lr
+ 80003ea: 46c0 nop @ (mov r8, r8)
+ 80003ec: 200001f8 .word 0x200001f8
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK)
- 8000500: 003b movs r3, r7
- 8000502: 2101 movs r1, #1
- 8000504: 0018 movs r0, r3
- 8000506: f001 faeb bl 8001ae0
- 800050a: 1e03 subs r3, r0, #0
- 800050c: d001 beq.n 8000512
+080003f0 :
+ HAL_StatusTypeDef status = HAL_OK;
+
+ if ((uint32_t)uwTickFreq != 0UL)
{
- Error_Handler();
- 800050e: f000 f8b1 bl 8000674
+ /*Configure the SysTick to have interrupt in 1ms time basis*/
+ if (HAL_SYSTICK_Config(SystemCoreClock / (1000UL / (uint32_t)uwTickFreq)) == 0U)
+ 80003f0: 21fa movs r1, #250 @ 0xfa
+{
+ 80003f2: b570 push {r4, r5, r6, lr}
+ if (HAL_SYSTICK_Config(SystemCoreClock / (1000UL / (uint32_t)uwTickFreq)) == 0U)
+ 80003f4: 4d12 ldr r5, [pc, #72] @ (8000440 )
+{
+ 80003f6: 0004 movs r4, r0
+ if (HAL_SYSTICK_Config(SystemCoreClock / (1000UL / (uint32_t)uwTickFreq)) == 0U)
+ 80003f8: 0089 lsls r1, r1, #2
+ 80003fa: 68e8 ldr r0, [r5, #12]
+ 80003fc: f001 fbae bl 8001b5c <__udivsi3>
+ function SysTick_Config is not included. In this case, the file device.h
+ must contain a vendor-specific implementation of this function.
+ */
+__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
+{
+ if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
+ 8000400: 2380 movs r3, #128 @ 0x80
+ 8000402: 3801 subs r0, #1
+ 8000404: 045b lsls r3, r3, #17
+ 8000406: 4298 cmp r0, r3
+ 8000408: d301 bcc.n 800040e
+ status = HAL_ERROR;
+ }
+ }
+ else
+ {
+ status = HAL_ERROR;
+ 800040a: 2001 movs r0, #1
+ status = HAL_ERROR;
}
+
+ /* Return function status */
+ return status;
}
- 8000512: 46c0 nop @ (mov r8, r8)
- 8000514: 46bd mov sp, r7
- 8000516: b00d add sp, #52 @ 0x34
- 8000518: bd90 pop {r4, r7, pc}
- ...
+ 800040c: bd70 pop {r4, r5, r6, pc}
+ {
+ return (1UL); /* Reload value impossible */
+ }
-0800051c :
- * @brief USART1 Initialization Function
- * @param None
- * @retval None
+ SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
+ 800040e: 490d ldr r1, [pc, #52] @ (8000444 )
+ SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
+ 8000410: 4a0d ldr r2, [pc, #52] @ (8000448 )
+ SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */
+ 8000412: 6048 str r0, [r1, #4]
+ SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
+ 8000414: 20c0 movs r0, #192 @ 0xc0
+ 8000416: 6a13 ldr r3, [r2, #32]
+ 8000418: 0600 lsls r0, r0, #24
+ 800041a: 021b lsls r3, r3, #8
+ 800041c: 0a1b lsrs r3, r3, #8
+ 800041e: 4303 orrs r3, r0
+ 8000420: 6213 str r3, [r2, #32]
+ NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
+ SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
+ 8000422: 2000 movs r0, #0
+ SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
+ 8000424: 2307 movs r3, #7
+ SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
+ 8000426: 6088 str r0, [r1, #8]
+ SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
+ 8000428: 600b str r3, [r1, #0]
+ if (TickPriority < (1UL << __NVIC_PRIO_BITS))
+ 800042a: 2c03 cmp r4, #3
+ 800042c: d8ed bhi.n 800040a
+ SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
+ 800042e: 6a13 ldr r3, [r2, #32]
+ 8000430: 07a1 lsls r1, r4, #30
+ 8000432: 021b lsls r3, r3, #8
+ 8000434: 0a1b lsrs r3, r3, #8
+ 8000436: 430b orrs r3, r1
+ 8000438: 6213 str r3, [r2, #32]
+ uwTickPrio = TickPriority;
+ 800043a: 612c str r4, [r5, #16]
+ return status;
+ 800043c: e7e6 b.n 800040c
+ 800043e: 46c0 nop @ (mov r8, r8)
+ 8000440: 20000000 .word 0x20000000
+ 8000444: e000e010 .word 0xe000e010
+ 8000448: e000ed00 .word 0xe000ed00
+
+0800044c :
*/
-static void MX_USART1_UART_Init(void)
+void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, const GPIO_InitTypeDef *pGPIO_Init)
{
- 800051c: b580 push {r7, lr}
- 800051e: af00 add r7, sp, #0
- /* USER CODE END USART1_Init 0 */
-
- /* USER CODE BEGIN USART1_Init 1 */
+ uint32_t tmp;
+ uint32_t iocurrent;
+ uint32_t position = 0U;
+ 800044c: 2300 movs r3, #0
+ 800044e: 469c mov ip, r3
+{
+ 8000450: b5f0 push {r4, r5, r6, r7, lr}
+ 8000452: b085 sub sp, #20
+ assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
+ assert_param(IS_GPIO_PIN(pGPIO_Init->Pin));
+ assert_param(IS_GPIO_MODE(pGPIO_Init->Mode));
+
+ /* Configure the port pins */
+ while (((pGPIO_Init->Pin) >> position) != 0U)
+ 8000454: 680b ldr r3, [r1, #0]
+ 8000456: 4664 mov r4, ip
+ 8000458: 001a movs r2, r3
+ 800045a: 40e2 lsrs r2, r4
+ 800045c: d101 bne.n 8000462
+ }
+ }
- /* USER CODE END USART1_Init 1 */
- huart1.Instance = USART1;
- 8000520: 4b23 ldr r3, [pc, #140] @ (80005b0 )
- 8000522: 4a24 ldr r2, [pc, #144] @ (80005b4 )
- 8000524: 601a str r2, [r3, #0]
- huart1.Init.BaudRate = 9600;
- 8000526: 4b22 ldr r3, [pc, #136] @ (80005b0 )
- 8000528: 2296 movs r2, #150 @ 0x96
- 800052a: 0192 lsls r2, r2, #6
- 800052c: 605a str r2, [r3, #4]
- huart1.Init.WordLength = UART_WORDLENGTH_8B;
- 800052e: 4b20 ldr r3, [pc, #128] @ (80005b0 )
- 8000530: 2200 movs r2, #0
- 8000532: 609a str r2, [r3, #8]
- huart1.Init.StopBits = UART_STOPBITS_1;
- 8000534: 4b1e ldr r3, [pc, #120] @ (80005b0 )
- 8000536: 2200 movs r2, #0
- 8000538: 60da str r2, [r3, #12]
- huart1.Init.Parity = UART_PARITY_NONE;
- 800053a: 4b1d ldr r3, [pc, #116] @ (80005b0 )
- 800053c: 2200 movs r2, #0
- 800053e: 611a str r2, [r3, #16]
- huart1.Init.Mode = UART_MODE_TX_RX;
- 8000540: 4b1b ldr r3, [pc, #108] @ (80005b0 )
- 8000542: 220c movs r2, #12
- 8000544: 615a str r2, [r3, #20]
- huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- 8000546: 4b1a ldr r3, [pc, #104] @ (80005b0 )
- 8000548: 2200 movs r2, #0
- 800054a: 619a str r2, [r3, #24]
- huart1.Init.OverSampling = UART_OVERSAMPLING_16;
- 800054c: 4b18 ldr r3, [pc, #96] @ (80005b0 )
- 800054e: 2200 movs r2, #0
- 8000550: 61da str r2, [r3, #28]
- huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
- 8000552: 4b17 ldr r3, [pc, #92] @ (80005b0 )
- 8000554: 2200 movs r2, #0
- 8000556: 621a str r2, [r3, #32]
- huart1.Init.ClockPrescaler = UART_PRESCALER_DIV1;
- 8000558: 4b15 ldr r3, [pc, #84] @ (80005b0 )
- 800055a: 2200 movs r2, #0
- 800055c: 625a str r2, [r3, #36] @ 0x24
- huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
- 800055e: 4b14 ldr r3, [pc, #80] @ (80005b0 )
- 8000560: 2200 movs r2, #0
- 8000562: 629a str r2, [r3, #40] @ 0x28
- if (HAL_UART_Init(&huart1) != HAL_OK)
- 8000564: 4b12 ldr r3, [pc, #72] @ (80005b0 )
- 8000566: 0018 movs r0, r3
- 8000568: f001 fd34 bl 8001fd4
- 800056c: 1e03 subs r3, r0, #0
- 800056e: d001 beq.n 8000574
- {
- Error_Handler();
- 8000570: f000 f880 bl 8000674
+ position++;
}
- if (HAL_UARTEx_SetTxFifoThreshold(&huart1, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK)
- 8000574: 4b0e ldr r3, [pc, #56] @ (80005b0 )
- 8000576: 2100 movs r1, #0
- 8000578: 0018 movs r0, r3
- 800057a: f003 fc43 bl 8003e04
- 800057e: 1e03 subs r3, r0, #0
- 8000580: d001 beq.n 8000586
- {
- Error_Handler();
- 8000582: f000 f877 bl 8000674
- }
- if (HAL_UARTEx_SetRxFifoThreshold(&huart1, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK)
- 8000586: 4b0a ldr r3, [pc, #40] @ (80005b0 )
- 8000588: 2100 movs r1, #0
- 800058a: 0018 movs r0, r3
- 800058c: f003 fc7a bl 8003e84
- 8000590: 1e03 subs r3, r0, #0
- 8000592: d001 beq.n 8000598
+}
+ 800045e: b005 add sp, #20
+ 8000460: bdf0 pop {r4, r5, r6, r7, pc}
+ iocurrent = (pGPIO_Init->Pin) & (1UL << position);
+ 8000462: 4662 mov r2, ip
+ 8000464: 2601 movs r6, #1
+ 8000466: 4096 lsls r6, r2
+ 8000468: 001a movs r2, r3
+ 800046a: 4032 ands r2, r6
+ 800046c: 9201 str r2, [sp, #4]
+ if (iocurrent != 0U)
+ 800046e: 4233 tst r3, r6
+ 8000470: d100 bne.n 8000474
+ 8000472: e094 b.n 800059e
+ if ((pGPIO_Init->Mode == GPIO_MODE_AF_PP) || (pGPIO_Init->Mode == GPIO_MODE_AF_OD))
+ 8000474: 684f ldr r7, [r1, #4]
+ 8000476: 2310 movs r3, #16
+ 8000478: 003d movs r5, r7
+ 800047a: 439d bics r5, r3
+ 800047c: 9503 str r5, [sp, #12]
+ 800047e: 2d02 cmp r5, #2
+ 8000480: d114 bne.n 80004ac
+ tmp = GPIOx->AFR[position >> 3U];
+ 8000482: 4663 mov r3, ip
+ 8000484: 08da lsrs r2, r3, #3
+ 8000486: 0092 lsls r2, r2, #2
+ 8000488: 1882 adds r2, r0, r2
+ 800048a: 6a13 ldr r3, [r2, #32]
+ tmp &= ~(0xFUL << ((position & 0x07U) * GPIO_AFRL_AFSEL1_Pos)) ;
+ 800048c: 2407 movs r4, #7
+ tmp = GPIOx->AFR[position >> 3U];
+ 800048e: 001d movs r5, r3
+ tmp &= ~(0xFUL << ((position & 0x07U) * GPIO_AFRL_AFSEL1_Pos)) ;
+ 8000490: 4663 mov r3, ip
+ 8000492: 401c ands r4, r3
+ 8000494: 230f movs r3, #15
+ 8000496: 00a4 lsls r4, r4, #2
+ 8000498: 40a3 lsls r3, r4
+ 800049a: 439d bics r5, r3
+ 800049c: 9502 str r5, [sp, #8]
+ tmp |= ((pGPIO_Init->Alternate & 0x0FUL) << ((position & 0x07U) * GPIO_AFRL_AFSEL1_Pos));
+ 800049e: 250f movs r5, #15
+ 80004a0: 690b ldr r3, [r1, #16]
+ 80004a2: 402b ands r3, r5
+ 80004a4: 40a3 lsls r3, r4
+ 80004a6: 9c02 ldr r4, [sp, #8]
+ 80004a8: 4323 orrs r3, r4
+ GPIOx->AFR[position >> 3U] = tmp;
+ 80004aa: 6213 str r3, [r2, #32]
+ tmp = GPIOx->MODER;
+ 80004ac: 4663 mov r3, ip
+ 80004ae: 005a lsls r2, r3, #1
+ tmp &= ~(GPIO_MODER_MODE0 << (position * GPIO_MODER_MODE1_Pos));
+ 80004b0: 2303 movs r3, #3
+ 80004b2: 4093 lsls r3, r2
+ tmp = GPIOx->MODER;
+ 80004b4: 6804 ldr r4, [r0, #0]
+ tmp &= ~(GPIO_MODER_MODE0 << (position * GPIO_MODER_MODE1_Pos));
+ 80004b6: 43dd mvns r5, r3
+ 80004b8: 439c bics r4, r3
+ tmp |= ((pGPIO_Init->Mode & GPIO_MODE) << (position * GPIO_MODER_MODE1_Pos));
+ 80004ba: 2303 movs r3, #3
+ 80004bc: 403b ands r3, r7
+ 80004be: 4093 lsls r3, r2
+ tmp &= ~(GPIO_MODER_MODE0 << (position * GPIO_MODER_MODE1_Pos));
+ 80004c0: 9502 str r5, [sp, #8]
+ if ((pGPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (pGPIO_Init->Mode == GPIO_MODE_AF_PP) ||
+ 80004c2: 9d03 ldr r5, [sp, #12]
+ tmp |= ((pGPIO_Init->Mode & GPIO_MODE) << (position * GPIO_MODER_MODE1_Pos));
+ 80004c4: 4323 orrs r3, r4
+ if ((pGPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (pGPIO_Init->Mode == GPIO_MODE_AF_PP) ||
+ 80004c6: 3d01 subs r5, #1
+ GPIOx->MODER = tmp;
+ 80004c8: 6003 str r3, [r0, #0]
+ if ((pGPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (pGPIO_Init->Mode == GPIO_MODE_AF_PP) ||
+ 80004ca: 2d01 cmp r5, #1
+ 80004cc: d80f bhi.n 80004ee
+ tmp = GPIOx->OSPEEDR;
+ 80004ce: 6884 ldr r4, [r0, #8]
+ tmp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * GPIO_OSPEEDR_OSPEED1_Pos));
+ 80004d0: 9b02 ldr r3, [sp, #8]
+ tmp |= (((pGPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4U) << position);
+ 80004d2: 2501 movs r5, #1
+ tmp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * GPIO_OSPEEDR_OSPEED1_Pos));
+ 80004d4: 401c ands r4, r3
+ tmp |= (pGPIO_Init->Speed << (position * GPIO_OSPEEDR_OSPEED1_Pos));
+ 80004d6: 68cb ldr r3, [r1, #12]
+ 80004d8: 4093 lsls r3, r2
+ 80004da: 4323 orrs r3, r4
+ GPIOx->OSPEEDR = tmp;
+ 80004dc: 6083 str r3, [r0, #8]
+ tmp |= (((pGPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4U) << position);
+ 80004de: 093b lsrs r3, r7, #4
+ 80004e0: 402b ands r3, r5
+ 80004e2: 4665 mov r5, ip
+ 80004e4: 40ab lsls r3, r5
+ tmp = GPIOx->OTYPER;
+ 80004e6: 6844 ldr r4, [r0, #4]
+ tmp &= ~(GPIO_OTYPER_OT0 << position) ;
+ 80004e8: 43b4 bics r4, r6
+ tmp |= (((pGPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4U) << position);
+ 80004ea: 4323 orrs r3, r4
+ GPIOx->OTYPER = tmp;
+ 80004ec: 6043 str r3, [r0, #4]
+ if (pGPIO_Init->Mode != GPIO_MODE_ANALOG)
+ 80004ee: 2f03 cmp r7, #3
+ 80004f0: d055 beq.n 800059e
+ tmp = GPIOx->PUPDR;
+ 80004f2: 68c4 ldr r4, [r0, #12]
+ tmp &= ~(GPIO_PUPDR_PUPD0 << (position * GPIO_PUPDR_PUPD1_Pos));
+ 80004f4: 9b02 ldr r3, [sp, #8]
+ 80004f6: 401c ands r4, r3
+ tmp |= ((pGPIO_Init->Pull) << (position * GPIO_PUPDR_PUPD1_Pos));
+ 80004f8: 688b ldr r3, [r1, #8]
+ 80004fa: 4093 lsls r3, r2
+ 80004fc: 4323 orrs r3, r4
+ GPIOx->PUPDR = tmp;
+ 80004fe: 60c3 str r3, [r0, #12]
+ if ((pGPIO_Init->Mode & EXTI_MODE) == EXTI_MODE)
+ 8000500: 2380 movs r3, #128 @ 0x80
+ 8000502: 055b lsls r3, r3, #21
+ 8000504: 421f tst r7, r3
+ 8000506: d04a beq.n 800059e
+ tmp = EXTI->EXTICR[position >> 2U];
+ 8000508: 4663 mov r3, ip
+ 800050a: 089a lsrs r2, r3, #2
+ 800050c: 4b25 ldr r3, [pc, #148] @ (80005a4 )
+ 800050e: 0092 lsls r2, r2, #2
+ 8000510: 18d2 adds r2, r2, r3
+ tmp &= ~((0x0FUL) << ((position & 0x03U) * EXTI_EXTICR1_EXTI1_Pos));
+ 8000512: 2403 movs r4, #3
+ 8000514: 4663 mov r3, ip
+ 8000516: 401c ands r4, r3
+ 8000518: 230f movs r3, #15
+ 800051a: 00e4 lsls r4, r4, #3
+ 800051c: 40a3 lsls r3, r4
+ tmp |= (GPIO_GET_INDEX(GPIOx) << ((position & 0x03U) * EXTI_EXTICR1_EXTI1_Pos));
+ 800051e: 26a0 movs r6, #160 @ 0xa0
+ tmp = EXTI->EXTICR[position >> 2U];
+ 8000520: 6e15 ldr r5, [r2, #96] @ 0x60
+ tmp |= (GPIO_GET_INDEX(GPIOx) << ((position & 0x03U) * EXTI_EXTICR1_EXTI1_Pos));
+ 8000522: 05f6 lsls r6, r6, #23
+ tmp &= ~((0x0FUL) << ((position & 0x03U) * EXTI_EXTICR1_EXTI1_Pos));
+ 8000524: 439d bics r5, r3
+ tmp |= (GPIO_GET_INDEX(GPIOx) << ((position & 0x03U) * EXTI_EXTICR1_EXTI1_Pos));
+ 8000526: 2300 movs r3, #0
+ 8000528: 42b0 cmp r0, r6
+ 800052a: d010 beq.n 800054e
+ 800052c: 4e1e ldr r6, [pc, #120] @ (80005a8 )
+ 800052e: 3301 adds r3, #1
+ 8000530: 42b0 cmp r0, r6
+ 8000532: d00c beq.n 800054e
+ 8000534: 4e1d ldr r6, [pc, #116] @ (80005ac )
+ 8000536: 3301 adds r3, #1
+ 8000538: 42b0 cmp r0, r6
+ 800053a: d008 beq.n 800054e
+ 800053c: 4e1c ldr r6, [pc, #112] @ (80005b0 )
+ 800053e: 3301 adds r3, #1
+ 8000540: 42b0 cmp r0, r6
+ 8000542: d004 beq.n 800054e
+ 8000544: 4b1b ldr r3, [pc, #108] @ (80005b4 )
+ 8000546: 18c3 adds r3, r0, r3
+ 8000548: 1e5e subs r6, r3, #1
+ 800054a: 41b3 sbcs r3, r6
+ 800054c: 3305 adds r3, #5
+ 800054e: 40a3 lsls r3, r4
+ 8000550: 432b orrs r3, r5
+ EXTI->EXTICR[position >> 2U] = tmp;
+ 8000552: 6613 str r3, [r2, #96] @ 0x60
+ tmp = EXTI->IMR1;
+ 8000554: 4b18 ldr r3, [pc, #96] @ (80005b8 )
+ tmp &= ~((uint32_t)iocurrent);
+ 8000556: 9a01 ldr r2, [sp, #4]
+ tmp = EXTI->IMR1;
+ 8000558: 6fdd ldr r5, [r3, #124] @ 0x7c
+ tmp |= iocurrent;
+ 800055a: 9c01 ldr r4, [sp, #4]
+ tmp &= ~((uint32_t)iocurrent);
+ 800055c: 43d2 mvns r2, r2
+ tmp |= iocurrent;
+ 800055e: 432c orrs r4, r5
+ if ((pGPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
+ 8000560: 03fe lsls r6, r7, #15
+ 8000562: d401 bmi.n 8000568
+ tmp &= ~((uint32_t)iocurrent);
+ 8000564: 002c movs r4, r5
+ 8000566: 4014 ands r4, r2
+ EXTI->IMR1 = tmp;
+ 8000568: 67dc str r4, [r3, #124] @ 0x7c
+ tmp = EXTI->EMR1;
+ 800056a: 4c14 ldr r4, [pc, #80] @ (80005bc )
+ tmp |= iocurrent;
+ 800056c: 9d01 ldr r5, [sp, #4]
+ tmp = EXTI->EMR1;
+ 800056e: 6fe3 ldr r3, [r4, #124] @ 0x7c
+ tmp |= iocurrent;
+ 8000570: 431d orrs r5, r3
+ if ((pGPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
+ 8000572: 03be lsls r6, r7, #14
+ 8000574: d401 bmi.n 800057a
+ tmp &= ~((uint32_t)iocurrent);
+ 8000576: 4013 ands r3, r2
+ 8000578: 001d movs r5, r3
+ EXTI->EMR1 = tmp;
+ 800057a: 4b0a ldr r3, [pc, #40] @ (80005a4 )
+ 800057c: 67e5 str r5, [r4, #124] @ 0x7c
+ tmp = EXTI->RTSR1;
+ 800057e: 681d ldr r5, [r3, #0]
+ tmp |= iocurrent;
+ 8000580: 9c01 ldr r4, [sp, #4]
+ 8000582: 432c orrs r4, r5
+ if ((pGPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
+ 8000584: 02fe lsls r6, r7, #11
+ 8000586: d401 bmi.n 800058c
+ tmp &= ~((uint32_t)iocurrent);
+ 8000588: 002c movs r4, r5
+ 800058a: 4014 ands r4, r2
+ EXTI->RTSR1 = tmp;
+ 800058c: 601c str r4, [r3, #0]
+ tmp = EXTI->FTSR1;
+ 800058e: 685c ldr r4, [r3, #4]
+ tmp |= iocurrent;
+ 8000590: 9d01 ldr r5, [sp, #4]
+ 8000592: 4325 orrs r5, r4
+ if ((pGPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
+ 8000594: 02bf lsls r7, r7, #10
+ 8000596: d401 bmi.n 800059c
+ tmp &= ~((uint32_t)iocurrent);
+ 8000598: 4014 ands r4, r2
+ 800059a: 0025 movs r5, r4
+ EXTI->FTSR1 = tmp;
+ 800059c: 605d str r5, [r3, #4]
+ position++;
+ 800059e: 2301 movs r3, #1
+ 80005a0: 449c add ip, r3
+ 80005a2: e757 b.n 8000454
+ 80005a4: 40021800 .word 0x40021800
+ 80005a8: 50000400 .word 0x50000400
+ 80005ac: 50000800 .word 0x50000800
+ 80005b0: 50000c00 .word 0x50000c00
+ 80005b4: afffec00 .word 0xafffec00
+ 80005b8: 40021804 .word 0x40021804
+ 80005bc: 40021808 .word 0x40021808
+
+080005c0 :
+uint32_t HAL_RCC_GetSysClockFreq(void)
+{
+ uint32_t hsidiv;
+ uint32_t sysclockfreq;
+#if defined(RCC_CR_SYSDIV)
+ uint32_t sysclockdiv = (uint32_t)(((RCC->CR & RCC_CR_SYSDIV) >> RCC_CR_SYSDIV_Pos) + 1U);
+ 80005c0: 2007 movs r0, #7
+#endif /* RCC_CR_SYSDIV */
+
+ if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI)
+ 80005c2: 2238 movs r2, #56 @ 0x38
+ uint32_t sysclockdiv = (uint32_t)(((RCC->CR & RCC_CR_SYSDIV) >> RCC_CR_SYSDIV_Pos) + 1U);
+ 80005c4: 4b12 ldr r3, [pc, #72] @ (8000610 )
+{
+ 80005c6: b510 push {r4, lr}
+ uint32_t sysclockdiv = (uint32_t)(((RCC->CR & RCC_CR_SYSDIV) >> RCC_CR_SYSDIV_Pos) + 1U);
+ 80005c8: 6819 ldr r1, [r3, #0]
+ if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI)
+ 80005ca: 689c ldr r4, [r3, #8]
+ uint32_t sysclockdiv = (uint32_t)(((RCC->CR & RCC_CR_SYSDIV) >> RCC_CR_SYSDIV_Pos) + 1U);
+ 80005cc: 0889 lsrs r1, r1, #2
+ 80005ce: 4001 ands r1, r0
+ 80005d0: 3101 adds r1, #1
+ if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI)
+ 80005d2: 4214 tst r4, r2
+ 80005d4: d107 bne.n 80005e6
{
- Error_Handler();
- 8000594: f000 f86e bl 8000674
- }
- if (HAL_UARTEx_DisableFifoMode(&huart1) != HAL_OK)
- 8000598: 4b05 ldr r3, [pc, #20] @ (80005b0 )
- 800059a: 0018 movs r0, r3
- 800059c: f003 fbf8 bl 8003d90
- 80005a0: 1e03 subs r3, r0, #0
- 80005a2: d001 beq.n 80005a8
+ /* HSISYS can be derived for HSI48 */
+ hsidiv = (1UL << ((READ_BIT(RCC->CR, RCC_CR_HSIDIV)) >> RCC_CR_HSIDIV_Pos));
+ 80005d6: 681b ldr r3, [r3, #0]
+ 80005d8: 0adb lsrs r3, r3, #11
+ 80005da: 4003 ands r3, r0
+
+ /* HSI used as system clock source */
+ sysclockfreq = (HSI_VALUE / hsidiv);
+ 80005dc: 480d ldr r0, [pc, #52] @ (8000614 )
+ 80005de: 40d8 lsrs r0, r3
+ else
{
- Error_Handler();
- 80005a4: f000 f866 bl 8000674
+ sysclockfreq = 0U;
}
- /* USER CODE BEGIN USART1_Init 2 */
-
- /* USER CODE END USART1_Init 2 */
-
+#if defined(RCC_CR_SYSDIV)
+ sysclockfreq = sysclockfreq / sysclockdiv;
+ 80005e0: f001 fabc bl 8001b5c <__udivsi3>
+#endif /* RCC_CR_SYSDIV */
+ return sysclockfreq;
}
- 80005a8: 46c0 nop @ (mov r8, r8)
- 80005aa: 46bd mov sp, r7
- 80005ac: bd80 pop {r7, pc}
- 80005ae: 46c0 nop @ (mov r8, r8)
- 80005b0: 200000b0 .word 0x200000b0
- 80005b4: 40013800 .word 0x40013800
-
-080005b8 :
- * @brief GPIO Initialization Function
- * @param None
- * @retval None
+ 80005e4: bd10 pop {r4, pc}
+ else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE)
+ 80005e6: 6898 ldr r0, [r3, #8]
+ 80005e8: 4010 ands r0, r2
+ 80005ea: 2808 cmp r0, #8
+ 80005ec: d00b beq.n 8000606
+ else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_LSE)
+ 80005ee: 6898 ldr r0, [r3, #8]
+ 80005f0: 4010 ands r0, r2
+ 80005f2: 2820 cmp r0, #32
+ 80005f4: d009 beq.n 800060a
+ else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_LSI)
+ 80005f6: 689b ldr r3, [r3, #8]
+ sysclockfreq = 0U;
+ 80005f8: 2000 movs r0, #0
+ else if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_LSI)
+ 80005fa: 4013 ands r3, r2
+ 80005fc: 2b18 cmp r3, #24
+ 80005fe: d1ef bne.n 80005e0
+ sysclockfreq = LSI_VALUE;
+ 8000600: 20fa movs r0, #250 @ 0xfa
+ 8000602: 01c0 lsls r0, r0, #7
+ 8000604: e7ec b.n 80005e0
+ sysclockfreq = HSE_VALUE;
+ 8000606: 4803 ldr r0, [pc, #12] @ (8000614 )
+ 8000608: e7ea b.n 80005e0
+ sysclockfreq = LSE_VALUE;
+ 800060a: 2080 movs r0, #128 @ 0x80
+ 800060c: 0200 lsls r0, r0, #8
+ 800060e: e7e7 b.n 80005e0
+ 8000610: 40021000 .word 0x40021000
+ 8000614: 02dc6c00 .word 0x02dc6c00
+
+08000618 :
+ * @note Each time PCLK1 changes, this function must be called to update the
+ * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
+ * @retval PCLK1 frequency in Hz
*/
-static void MX_GPIO_Init(void)
+uint32_t HAL_RCC_GetPCLK1Freq(void)
{
- 80005b8: b580 push {r7, lr}
- 80005ba: b084 sub sp, #16
- 80005bc: af00 add r7, sp, #0
-/* USER CODE BEGIN MX_GPIO_Init_1 */
-/* USER CODE END MX_GPIO_Init_1 */
-
- /* GPIO Ports Clock Enable */
- __HAL_RCC_GPIOC_CLK_ENABLE();
- 80005be: 4b14 ldr r3, [pc, #80] @ (8000610 )
- 80005c0: 6b5a ldr r2, [r3, #52] @ 0x34
- 80005c2: 4b13 ldr r3, [pc, #76] @ (8000610 )
- 80005c4: 2104 movs r1, #4
- 80005c6: 430a orrs r2, r1
- 80005c8: 635a str r2, [r3, #52] @ 0x34
- 80005ca: 4b11 ldr r3, [pc, #68] @ (8000610 )
- 80005cc: 6b5b ldr r3, [r3, #52] @ 0x34
- 80005ce: 2204 movs r2, #4
- 80005d0: 4013 ands r3, r2
- 80005d2: 60fb str r3, [r7, #12]
- 80005d4: 68fb ldr r3, [r7, #12]
- __HAL_RCC_GPIOF_CLK_ENABLE();
- 80005d6: 4b0e ldr r3, [pc, #56] @ (8000610 )
- 80005d8: 6b5a ldr r2, [r3, #52] @ 0x34
- 80005da: 4b0d ldr r3, [pc, #52] @ (8000610 )
- 80005dc: 2120 movs r1, #32
- 80005de: 430a orrs r2, r1
- 80005e0: 635a str r2, [r3, #52] @ 0x34
- 80005e2: 4b0b ldr r3, [pc, #44] @ (8000610 )
- 80005e4: 6b5b ldr r3, [r3, #52] @ 0x34
- 80005e6: 2220 movs r2, #32
- 80005e8: 4013 ands r3, r2
- 80005ea: 60bb str r3, [r7, #8]
- 80005ec: 68bb ldr r3, [r7, #8]
- __HAL_RCC_GPIOA_CLK_ENABLE();
- 80005ee: 4b08 ldr r3, [pc, #32] @ (8000610 )
- 80005f0: 6b5a ldr r2, [r3, #52] @ 0x34
- 80005f2: 4b07 ldr r3, [pc, #28] @ (8000610 )
- 80005f4: 2101 movs r1, #1
- 80005f6: 430a orrs r2, r1
- 80005f8: 635a str r2, [r3, #52] @ 0x34
- 80005fa: 4b05 ldr r3, [pc, #20] @ (8000610 )
- 80005fc: 6b5b ldr r3, [r3, #52] @ 0x34
- 80005fe: 2201 movs r2, #1
- 8000600: 4013 ands r3, r2
- 8000602: 607b str r3, [r7, #4]
- 8000604: 687b ldr r3, [r7, #4]
-
-/* USER CODE BEGIN MX_GPIO_Init_2 */
-/* USER CODE END MX_GPIO_Init_2 */
+ 8000618: b510 push {r4, lr}
+ SystemCoreClock = (HAL_RCC_GetSysClockFreq() >> ((AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) \
+ 800061a: f7ff ffd1 bl 80005c0
+ >> RCC_CFGR_HPRE_Pos]) & 0x1FU));
+ 800061e: 211f movs r1, #31
+ SystemCoreClock = (HAL_RCC_GetSysClockFreq() >> ((AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) \
+ 8000620: 4c09 ldr r4, [pc, #36] @ (8000648 )
+ 8000622: 4a0a ldr r2, [pc, #40] @ (800064c )
+ 8000624: 68a3 ldr r3, [r4, #8]
+ >> RCC_CFGR_HPRE_Pos]) & 0x1FU));
+ 8000626: 051b lsls r3, r3, #20
+ 8000628: 0f1b lsrs r3, r3, #28
+ SystemCoreClock = (HAL_RCC_GetSysClockFreq() >> ((AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) \
+ 800062a: 009b lsls r3, r3, #2
+ >> RCC_CFGR_HPRE_Pos]) & 0x1FU));
+ 800062c: 589b ldr r3, [r3, r2]
+ 800062e: 400b ands r3, r1
+ SystemCoreClock = (HAL_RCC_GetSysClockFreq() >> ((AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) \
+ 8000630: 40d8 lsrs r0, r3
+ 8000632: 4b07 ldr r3, [pc, #28] @ (8000650 )
+ 8000634: 60d8 str r0, [r3, #12]
+ /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
+ return (HAL_RCC_GetHCLKFreq() >> ((APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE) >> RCC_CFGR_PPRE_Pos]) & 0x1FU));
+ 8000636: 68a3 ldr r3, [r4, #8]
+ 8000638: 045b lsls r3, r3, #17
+ 800063a: 0f5b lsrs r3, r3, #29
+ 800063c: 009b lsls r3, r3, #2
+ 800063e: 18d2 adds r2, r2, r3
+ 8000640: 6c13 ldr r3, [r2, #64] @ 0x40
+ 8000642: 400b ands r3, r1
+ 8000644: 40d8 lsrs r0, r3
}
- 8000606: 46c0 nop @ (mov r8, r8)
- 8000608: 46bd mov sp, r7
- 800060a: b004 add sp, #16
- 800060c: bd80 pop {r7, pc}
- 800060e: 46c0 nop @ (mov r8, r8)
- 8000610: 40021000 .word 0x40021000
+ 8000646: bd10 pop {r4, pc}
+ 8000648: 40021000 .word 0x40021000
+ 800064c: 080072e0 .word 0x080072e0
+ 8000650: 20000000 .word 0x20000000
-08000614 :
+08000654 :
+{
+ 8000654: b530 push {r4, r5, lr}
+ */
+__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void)
+{
+ uint32_t result;
-/* USER CODE BEGIN 4 */
-void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
+ __ASM volatile ("MRS %0, primask" : "=r" (result) );
+ 8000656: f3ef 8410 mrs r4, PRIMASK
+ \details Assigns the given value to the Priority Mask Register.
+ \param [in] priMask Priority Mask
+ */
+__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask)
+{
+ __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
+ 800065a: 2201 movs r2, #1
+ 800065c: f382 8810 msr PRIMASK, r2
+ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE));
+ 8000660: 6801 ldr r1, [r0, #0]
+ 8000662: 4d13 ldr r5, [pc, #76] @ (80006b0 )
+ 8000664: 680b ldr r3, [r1, #0]
+ 8000666: 402b ands r3, r5
+ 8000668: 600b str r3, [r1, #0]
+ 800066a: f384 8810 msr PRIMASK, r4
+ __ASM volatile ("MRS %0, primask" : "=r" (result) );
+ 800066e: f3ef 8110 mrs r1, PRIMASK
+ __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
+ 8000672: f382 8810 msr PRIMASK, r2
+ ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE));
+ 8000676: 6802 ldr r2, [r0, #0]
+ 8000678: 4c0e ldr r4, [pc, #56] @ (80006b4 )
+ 800067a: 6893 ldr r3, [r2, #8]
+ 800067c: 4023 ands r3, r4
+ 800067e: 6093 str r3, [r2, #8]
+ 8000680: f381 8810 msr PRIMASK, r1
+ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
+ 8000684: 6ec3 ldr r3, [r0, #108] @ 0x6c
+ 8000686: 2b01 cmp r3, #1
+ 8000688: d10a bne.n 80006a0
+ __ASM volatile ("MRS %0, primask" : "=r" (result) );
+ 800068a: f3ef 8110 mrs r1, PRIMASK
+ __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
+ 800068e: f383 8810 msr PRIMASK, r3
+ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
+ 8000692: 2410 movs r4, #16
+ 8000694: 6802 ldr r2, [r0, #0]
+ 8000696: 6813 ldr r3, [r2, #0]
+ 8000698: 43a3 bics r3, r4
+ 800069a: 6013 str r3, [r2, #0]
+ 800069c: f381 8810 msr PRIMASK, r1
+ huart->RxState = HAL_UART_STATE_READY;
+ 80006a0: 0003 movs r3, r0
+ 80006a2: 2220 movs r2, #32
+ 80006a4: 338c adds r3, #140 @ 0x8c
+ 80006a6: 601a str r2, [r3, #0]
+ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
+ 80006a8: 2300 movs r3, #0
+ 80006aa: 66c3 str r3, [r0, #108] @ 0x6c
+ huart->RxISR = NULL;
+ 80006ac: 6743 str r3, [r0, #116] @ 0x74
+}
+ 80006ae: bd30 pop {r4, r5, pc}
+ 80006b0: fffffedf .word 0xfffffedf
+ 80006b4: effffffe .word 0xeffffffe
+
+080006b8 :
+HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status,
+ 80006b8: b5f8 push {r3, r4, r5, r6, r7, lr}
+ 80006ba: 0004 movs r4, r0
+ while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
+ 80006bc: 6800 ldr r0, [r0, #0]
+ 80006be: 69c5 ldr r5, [r0, #28]
+ 80006c0: 400d ands r5, r1
+ 80006c2: 42a9 cmp r1, r5
+ 80006c4: d101 bne.n 80006ca
+ return HAL_OK;
+ 80006c6: 2000 movs r0, #0
+ 80006c8: e01f b.n 800070a
+ if (Timeout != HAL_MAX_DELAY)
+ 80006ca: 1c5d adds r5, r3, #1
+ 80006cc: d0f7 beq.n 80006be
+ * implementations in user file.
+ * @retval tick value
+ */
+__weak uint32_t HAL_GetTick(void)
{
- 8000614: b590 push {r4, r7, lr}
- 8000616: b087 sub sp, #28
- 8000618: af00 add r7, sp, #0
- 800061a: 6078 str r0, [r7, #4]
- UNUSED(huart);
-
- /* NOTE : This function should not be modified, when the callback is needed,
- the HAL_UART_RxCpltCallback can be implemented in the user file.
- */
- uint8_t response[]= "Received!\n";
- 800061c: 240c movs r4, #12
- 800061e: 193b adds r3, r7, r4
- 8000620: 4a08 ldr r2, [pc, #32] @ (8000644 )
- 8000622: ca03 ldmia r2!, {r0, r1}
- 8000624: c303 stmia r3!, {r0, r1}
- 8000626: 8811 ldrh r1, [r2, #0]
- 8000628: 8019 strh r1, [r3, #0]
- 800062a: 7892 ldrb r2, [r2, #2]
- 800062c: 709a strb r2, [r3, #2]
- HAL_UART_Transmit(&huart1,response, sizeof(response)-1, 10);
- 800062e: 1939 adds r1, r7, r4
- 8000630: 4805 ldr r0, [pc, #20] @ (8000648 )
- 8000632: 230a movs r3, #10
- 8000634: 220a movs r2, #10
- 8000636: f001 fd23 bl 8002080
+ return uwTick;
+ 80006ce: 4d18 ldr r5, [pc, #96] @ (8000730 )
+ 80006d0: 686d ldr r5, [r5, #4]
+ if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
+ 80006d2: 1aad subs r5, r5, r2
+ 80006d4: 42ab cmp r3, r5
+ 80006d6: d328 bcc.n 800072a
+ if ((READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) && (Flag != UART_FLAG_TXE) && (Flag != UART_FLAG_TC))
+ 80006d8: 6805 ldr r5, [r0, #0]
+ 80006da: 076d lsls r5, r5, #29
+ 80006dc: d5ef bpl.n 80006be
+ 80006de: 000d movs r5, r1
+ 80006e0: 2640 movs r6, #64 @ 0x40
+ 80006e2: 3d40 subs r5, #64 @ 0x40
+ 80006e4: 43b5 bics r5, r6
+ 80006e6: d0ea beq.n 80006be
+ if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) == SET)
+ 80006e8: 69c7 ldr r7, [r0, #28]
+ 80006ea: 2508 movs r5, #8
+ 80006ec: 003e movs r6, r7
+ 80006ee: 402e ands r6, r5
+ 80006f0: 422f tst r7, r5
+ 80006f2: d00b beq.n 800070c
+ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF);
+ 80006f4: 6205 str r5, [r0, #32]
+ UART_EndRxTransfer(huart);
+ 80006f6: 0020 movs r0, r4
+ 80006f8: f7ff ffac bl 8000654
+ huart->ErrorCode = HAL_UART_ERROR_ORE;
+ 80006fc: 0023 movs r3, r4
+ 80006fe: 3390 adds r3, #144 @ 0x90
+ 8000700: 601d str r5, [r3, #0]
+ __HAL_UNLOCK(huart);
+ 8000702: 2300 movs r3, #0
+ return HAL_ERROR;
+ 8000704: 2001 movs r0, #1
+ __HAL_UNLOCK(huart);
+ 8000706: 3484 adds r4, #132 @ 0x84
+ 8000708: 7023 strb r3, [r4, #0]
}
- 800063a: 46c0 nop @ (mov r8, r8)
- 800063c: 46bd mov sp, r7
- 800063e: b007 add sp, #28
- 8000640: bd90 pop {r4, r7, pc}
- 8000642: 46c0 nop @ (mov r8, r8)
- 8000644: 08004ebc .word 0x08004ebc
- 8000648: 200000b0 .word 0x200000b0
-
-0800064c :
- * @brief BSP Push Button callback
- * @param Button Specifies the pressed button
+ 800070a: bdf8 pop {r3, r4, r5, r6, r7, pc}
+ if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET)
+ 800070c: 2580 movs r5, #128 @ 0x80
+ 800070e: 69c7 ldr r7, [r0, #28]
+ 8000710: 012d lsls r5, r5, #4
+ 8000712: 422f tst r7, r5
+ 8000714: d0d3 beq.n 80006be
+ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF);
+ 8000716: 6205 str r5, [r0, #32]
+ UART_EndRxTransfer(huart);
+ 8000718: 0020 movs r0, r4
+ 800071a: f7ff ff9b bl 8000654
+ huart->ErrorCode = HAL_UART_ERROR_RTO;
+ 800071e: 0023 movs r3, r4
+ 8000720: 2220 movs r2, #32
+ 8000722: 3390 adds r3, #144 @ 0x90
+ __HAL_UNLOCK(huart);
+ 8000724: 3484 adds r4, #132 @ 0x84
+ huart->ErrorCode = HAL_UART_ERROR_RTO;
+ 8000726: 601a str r2, [r3, #0]
+ __HAL_UNLOCK(huart);
+ 8000728: 7026 strb r6, [r4, #0]
+ return HAL_TIMEOUT;
+ 800072a: 2003 movs r0, #3
+ 800072c: e7ed b.n 800070a
+ 800072e: 46c0 nop @ (mov r8, r8)
+ 8000730: 200001f8 .word 0x200001f8
+
+08000734 :
+ * @note The RX FIFO depth and the TX FIFO depth is extracted from
+ * the UART configuration registers.
+ * @param huart UART handle.
* @retval None
*/
-void BSP_PB_Callback(Button_TypeDef Button)
+static void UARTEx_SetNbDataToProcess(UART_HandleTypeDef *huart)
+ 8000734: b5f8 push {r3, r4, r5, r6, r7, lr}
+ }
+ else
+ {
+ rx_fifo_depth = RX_FIFO_DEPTH;
+ tx_fifo_depth = TX_FIFO_DEPTH;
+ rx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos);
+ 8000736: 4c0c ldr r4, [pc, #48] @ (8000768 )
+ tx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_TXFTCFG) >> USART_CR3_TXFTCFG_Pos);
+ huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) /
+ 8000738: 4e0c ldr r6, [pc, #48] @ (800076c )
+ rx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos);
+ 800073a: 6823 ldr r3, [r4, #0]
+ (uint16_t)denominator[tx_fifo_threshold];
+ 800073c: 4d0c ldr r5, [pc, #48] @ (8000770 )
+ rx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos);
+ 800073e: 689f ldr r7, [r3, #8]
+ tx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_TXFTCFG) >> USART_CR3_TXFTCFG_Pos);
+ 8000740: 689b ldr r3, [r3, #8]
+ 8000742: 0f5b lsrs r3, r3, #29
+ huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) /
+ 8000744: 5cf0 ldrb r0, [r6, r3]
+ (uint16_t)denominator[tx_fifo_threshold];
+ 8000746: 5ce9 ldrb r1, [r5, r3]
+ huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) /
+ 8000748: 00c0 lsls r0, r0, #3
+ 800074a: f001 fa91 bl 8001c70 <__divsi3>
+ 800074e: 0023 movs r3, r4
+ 8000750: 336a adds r3, #106 @ 0x6a
+ 8000752: 8018 strh r0, [r3, #0]
+ rx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos);
+ 8000754: 013b lsls r3, r7, #4
+ huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) /
+ 8000756: 0f5b lsrs r3, r3, #29
+ 8000758: 5cf0 ldrb r0, [r6, r3]
+ (uint16_t)denominator[rx_fifo_threshold];
+ 800075a: 5ce9 ldrb r1, [r5, r3]
+ huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) /
+ 800075c: 00c0 lsls r0, r0, #3
+ 800075e: f001 fa87 bl 8001c70 <__divsi3>
+ 8000762: 3468 adds r4, #104 @ 0x68
+ 8000764: 8020 strh r0, [r4, #0]
+ }
+}
+ 8000766: bdf8 pop {r3, r4, r5, r6, r7, pc}
+ 8000768: 200003ec .word 0x200003ec
+ 800076c: 08007340 .word 0x08007340
+ 8000770: 08007348 .word 0x08007348
+
+08000774