Strip tabs and trailing white spaces, and fix end of files (#748)
* format: Strip trailing whitespaces
We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.
Commit was generated with:
pre-commit run --all-files trailing-whitespace
* format: Files should have exactly one new line end of them
It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.
Commit was generated with:
pre-commit run --all-files end-of-file-fixer
* format: Convert tabs to spaces
Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.
Commit was generated with:
pre-commit run --all-files remove-tabs
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# This is a CMake example for STM32 ARM Cortex-M3 STM32F103RGT6 on
|
||||
# a STM32 Discovery Kit evaluation board using the ARM GCC compiler
|
||||
# a STM32 Discovery Kit evaluation board using the ARM GCC compiler
|
||||
# and STM32 CMSIS library.
|
||||
#
|
||||
# Board STM32F103 Discovery Kit
|
||||
@@ -234,13 +234,13 @@ target_compile_definitions(${EXECUTABLE} PRIVATE
|
||||
# inhibit pedantic warnings
|
||||
target_compile_options(${EXECUTABLE} PRIVATE
|
||||
-Wall -Wextra -pedantic
|
||||
-Wfloat-equal -Wconversion -Wredundant-decls
|
||||
-Wfloat-equal -Wconversion -Wredundant-decls
|
||||
-Wswitch-default
|
||||
# don't warn about conversion, sign, compares, long long and attributes
|
||||
# since they are common in embedded
|
||||
-Wno-sign-conversion
|
||||
-Wno-sign-conversion
|
||||
-Wno-conversion
|
||||
-Wno-sign-compare
|
||||
-Wno-sign-compare
|
||||
-Wno-long-long
|
||||
-Wno-attributes
|
||||
# don't warn about implicit fallthrough since it is common in network protocols
|
||||
@@ -296,7 +296,7 @@ add_custom_target(symbols
|
||||
)
|
||||
|
||||
# calculate the worst case CSTACK memory usage by size and place into a file
|
||||
add_custom_target(cstack
|
||||
add_custom_target(cstack
|
||||
DEPENDS ${EXECUTABLE}
|
||||
COMMENT "Print CSTACK memory depth by size"
|
||||
COMMAND ${CMAKE_CSTACK} ${EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR} 1> ${PROJECT_NAME}.su
|
||||
@@ -306,7 +306,7 @@ add_custom_target(cstack
|
||||
)
|
||||
|
||||
# Print file and library sizes
|
||||
add_custom_target(memmap
|
||||
add_custom_target(memmap
|
||||
DEPENDS ${PROJECT_NAME}.map
|
||||
COMMENT "Print file and library memory usage by size"
|
||||
COMMAND ${CMAKE_MEMAP} -t GCC_ARM ${PROJECT_NAME}.map
|
||||
|
||||
@@ -231,7 +231,7 @@ ram-usage:
|
||||
@$(NM) -t d -S --size-sort $(TARGET).elf 1> $(TARGET).nm
|
||||
@echo "=ADDRESS= ==SIZE== = ==VARIABLE NAME=="
|
||||
@tail $(TARGET).nm
|
||||
|
||||
|
||||
.PHONY: cstack
|
||||
cstack:
|
||||
@$(CSTACK_TOOL) $(COBJ) 2> /dev/null 1> $(TARGET).su
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
@@ -78,7 +78,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>OGChipSelectEditMenu</name>
|
||||
<state>STM32F103ZG ST STM32F103ZG</state>
|
||||
<state>STM32F103ZG ST STM32F103ZG</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenLowLevelInterface</name>
|
||||
@@ -138,7 +138,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>GFPUDeviceSlave</name>
|
||||
<state>STM32F103ZG ST STM32F103ZG</state>
|
||||
<state>STM32F103ZG ST STM32F103ZG</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FPU2</name>
|
||||
|
||||
@@ -6,5 +6,3 @@
|
||||
</project>
|
||||
<batchBuild/>
|
||||
</workspace>
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ struct object_data Object_List[BACNET_NETWORK_PORTS_MAX];
|
||||
#define BACNET_NETWORK_PORT_INSTANCE 1
|
||||
#endif
|
||||
|
||||
/* BACnetARRAY of REAL, is an array of the link speeds
|
||||
/* BACnetARRAY of REAL, is an array of the link speeds
|
||||
supported by this network port */
|
||||
static uint32_t Link_Speeds[] = {9600, 19200, 38400, 57600, 76800, 115200 };
|
||||
|
||||
@@ -372,8 +372,8 @@ static int Network_Port_Link_Speeds_Encode(
|
||||
|
||||
/**
|
||||
* @brief Set the device link speed (baud rate)
|
||||
* @param object_instance The object instance number of the object
|
||||
* @param value The new link speed value
|
||||
* @param object_instance The object instance number of the object
|
||||
* @param value The new link speed value
|
||||
* @return true if value was set
|
||||
*/
|
||||
bool Network_Port_Link_Speed_Set(uint32_t object_instance, float value)
|
||||
|
||||
+14
-14
@@ -1,31 +1,31 @@
|
||||
This port was done with the STM32 ARM Cortex-M3 STM32F103RGT6 on
|
||||
This port was done with the STM32 ARM Cortex-M3 STM32F103RGT6 on
|
||||
a STM32 Discovery Kit using the STM32 CMSIS library and drivers
|
||||
and IAR EWARM 6.10 compiler.
|
||||
|
||||
The CMSIS library was 21MiB compressed, so I didn't include it
|
||||
as part of this project. The CMSIS and drivers
|
||||
as part of this project. The CMSIS and drivers
|
||||
can be found by following the 'Click here for STM32
|
||||
embedded firmware' link from the resources page:
|
||||
http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&SubClassID=1169
|
||||
There will be a list of firmware resources.
|
||||
The library you are looking for is in the
|
||||
There will be a list of firmware resources.
|
||||
The library you are looking for is in the
|
||||
‘ARM-based 32-bit MCU STM32F10xxx standard peripheral library’.
|
||||
Download the
|
||||
‘ARM-based 32-bit MCU STM32F10xxx standard peripheral library’
|
||||
and the CMSIS library can be found in
|
||||
'…\STM32F10x_StdPeriph_Lib_V3.4.0\Libraries\CMSIS\CM3'.
|
||||
Download the
|
||||
‘ARM-based 32-bit MCU STM32F10xxx standard peripheral library’
|
||||
and the CMSIS library can be found in
|
||||
'…\STM32F10x_StdPeriph_Lib_V3.4.0\Libraries\CMSIS\CM3'.
|
||||
Copy the contents of 'CMSIS' to the 'CMSIS' folder in this project.
|
||||
and the drivers library can be found in
|
||||
'…\STM32F10x_StdPeriph_Lib_V3.4.0\Libraries\STM32F10x_StdPeriph_Driver'.
|
||||
Copy the contents of 'STM32F10x_StdPeriph_Driver' to the
|
||||
and the drivers library can be found in
|
||||
'…\STM32F10x_StdPeriph_Lib_V3.4.0\Libraries\STM32F10x_StdPeriph_Driver'.
|
||||
Copy the contents of 'STM32F10x_StdPeriph_Driver' to the
|
||||
'drivers' folder in this project.
|
||||
|
||||
The hardware interface only uses the USART and a peripheral pin
|
||||
(RTS) for the MS/TP RS-485 interface, and the System Clock for
|
||||
(RTS) for the MS/TP RS-485 interface, and the System Clock for
|
||||
the millisecond timer.
|
||||
|
||||
It was created for the STM32 Design Challenge on March 20, 2011,
|
||||
by Steve Karg. Although the design didn't win any awards,
|
||||
it was one of the six finalists and was on display at the
|
||||
by Steve Karg. Although the design didn't win any awards,
|
||||
it was one of the six finalists and was on display at the
|
||||
STM booth at the 2010 Embedded Systems Conference West.
|
||||
http://www.stm32challenge.com/
|
||||
|
||||
@@ -22,10 +22,10 @@ SECTIONS
|
||||
*(.gnu.linkonce.r.*)
|
||||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
_sidata = _etext;
|
||||
_sidata = _etext;
|
||||
PROVIDE(etext = .);
|
||||
_fini = . ;
|
||||
*(.fini)
|
||||
_fini = . ;
|
||||
*(.fini)
|
||||
|
||||
} >flash
|
||||
|
||||
@@ -40,20 +40,20 @@ SECTIONS
|
||||
_edata = .;
|
||||
} >sram
|
||||
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab*)
|
||||
} >sram
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab*)
|
||||
} >sram
|
||||
|
||||
__exidx_start = .;
|
||||
.ARM.exidx :
|
||||
{
|
||||
*(.ARM.exidx*)
|
||||
} >sram
|
||||
__exidx_end = .;
|
||||
__exidx_start = .;
|
||||
.ARM.exidx :
|
||||
{
|
||||
*(.ARM.exidx*)
|
||||
} >sram
|
||||
__exidx_end = .;
|
||||
|
||||
.bss (NOLOAD) : {
|
||||
. = ALIGN(4);
|
||||
. = ALIGN(4);
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .;
|
||||
*(.bss .bss.*)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include "stm32f10x_usart.h"
|
||||
#include "stm32f10x_wwdg.h"
|
||||
/* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
|
||||
#include "stm32f10x_misc.h"
|
||||
#include "stm32f10x_misc.h"
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
@@ -28,4 +28,4 @@ place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
|
||||
|
||||
place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite,
|
||||
block CSTACK, block HEAP };
|
||||
block CSTACK, block HEAP };
|
||||
|
||||
@@ -397,7 +397,7 @@ static void SetSysClock(void)
|
||||
/**
|
||||
* @brief Setup the external memory controller.
|
||||
* Called in startup_stm32f10x_xx.s/.c before jump to main.
|
||||
* This function configures the external SRAM mounted on
|
||||
* This function configures the external SRAM mounted on
|
||||
* STM3210E-EVAL board (STM32 High density devices). This SRAM will be used as
|
||||
* program data memory (including heap and stack).
|
||||
* @param None
|
||||
|
||||
Reference in New Issue
Block a user