Skip to content

Commit 5c2f9c0

Browse files
committed
refactor: core stm32 header files move to SrcWrapper
belong to sources. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 6c0c006 commit 5c2f9c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+48
-26
lines changed

CI/update/stm32cube.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ def checkConfig():
123123
stm32_def = (
124124
repo_local_path
125125
/ repo_core_name
126-
/ "cores"
127-
/ "arduino"
128-
/ "stm32"
126+
/ "libraries"
127+
/ "SrcWrapper"
129128
/ stm32_def
130129
)
131130
except IOError:

CI/update/stm32wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def checkConfig(arg_core, arg_cmsis):
9797

9898
HALoutSrc_path = SrcWrapper_path / "src" / "HAL"
9999
LLoutSrc_path = SrcWrapper_path / "src" / "LL"
100-
LLoutInc_path = core_path / "cores" / "arduino" / "stm32" / "LL"
100+
LLoutInc_path = SrcWrapper_path / "inc" / "LL"
101101

102102
if arg_cmsis is not None:
103103
CMSIS_path = Path(arg_cmsis).resolve()

License.md

+4-1

cmake/set_base_arduino_config.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ target_include_directories(base_config INTERFACE
5555
"${BUILD_CORE_PATH}"
5656
"${BUILD_CORE_PATH}/avr"
5757
"${BUILD_CORE_PATH}/stm32"
58-
"${BUILD_CORE_PATH}/stm32/LL"
5958
"${BUILD_CORE_PATH}/stm32/usb"
6059
"${BUILD_CORE_PATH}/stm32/OpenAMP"
6160
"${BUILD_CORE_PATH}/stm32/usb/hid"
6261
"${BUILD_CORE_PATH}/stm32/usb/cdc"
62+
"${BUILD_LIB_PATH}/SrcWrapper/inc"
63+
"${BUILD_LIB_PATH}/SrcWrapper/inc/LL"
6364
"${BUILD_SYSTEM_PATH}/Middlewares/ST/STM32_USB_Device_Library/Core/Inc"
6465
"${BUILD_SYSTEM_PATH}/Middlewares/ST/STM32_USB_Device_Library/Core/Src"
6566
"${CMSIS5_PATH}/CMSIS/DSP/Include"

cores/arduino/stm32/PinNames.h renamed to libraries/SrcWrapper/inc/PinNames.h

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2016-2021, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
113
#ifndef _PINNAMES_H
214
#define _PINNAMES_H
315

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

libraries/SrcWrapper/src/new.cpp

+25-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
3-
4-
This library is free software; you can redistribute it and/or
5-
modify it under the terms of the GNU Lesser General Public
6-
License as published by the Free Software Foundation; either
7-
version 2.1 of the License, or (at your option) any later version.
8-
9-
This library is distributed in the hope that it will be useful,
10-
but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12-
See the GNU Lesser General Public License for more details.
13-
14-
You should have received a copy of the GNU Lesser General Public
15-
License along with this library; if not, write to the Free Software
16-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17-
*/
18-
1+
/* Teensyduino Core Library
2+
* http://www.pjrc.com/teensy/
3+
* Copyright (c) 2017 PJRC.COM, LLC.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining
6+
* a copy of this software and associated documentation files (the
7+
* "Software"), to deal in the Software without restriction, including
8+
* without limitation the rights to use, copy, modify, merge, publish,
9+
* distribute, sublicense, and/or sell copies of the Software, and to
10+
* permit persons to whom the Software is furnished to do so, subject to
11+
* the following conditions:
12+
*
13+
* 1. The above copyright notice and this permission notice shall be
14+
* included in all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20+
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21+
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
*/
1925
#include <stdlib.h>
2026

2127
void *operator new (size_t size)
@@ -46,4 +52,4 @@ void operator delete (void *ptr, size_t /*size*/)
4652
void operator delete[](void *ptr, size_t /*size*/)
4753
{
4854
free(ptr);
49-
}
55+
}

platform.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ hal_dir={build.system.path}/Drivers/{build.series}_HAL_Driver
2929
cmsis_dir={runtime.tools.CMSIS-5.9.0.path}/CMSIS
3030
cmsis_dev_dir={build.system.path}/Drivers/CMSIS/Device/ST/{build.series}
3131
usbd_core_dir={build.system.path}/Middlewares/ST/STM32_USB_Device_Library/Core
32+
SrcWrapper_include_dir={runtime.platform.path}/libraries/SrcWrapper/inc
3233

3334
# STM compile variables
3435
# ----------------------
35-
compiler.stm.extra_include="-I{build.source.path}" "-I{build.core.path}/avr" "-I{core_stm32_dir}" "-I{core_stm32_dir}/LL" "-I{core_usb_dir}" "-I{core_stm32_dir}/OpenAMP" "-I{core_usb_dir}/hid" "-I{core_usb_dir}/cdc" "-I{hal_dir}/Inc" "-I{hal_dir}/Src" "-I{build.system.path}/{build.series}" "-I{usbd_core_dir}/Inc" "-I{usbd_core_dir}/Src" {build.virtio_extra_include}
36+
compiler.stm.extra_include="-I{build.source.path}" "-I{build.core.path}/avr" "-I{core_stm32_dir}" "-I{core_stm32_dir}/LL" "-I{SrcWrapper_include_dir}" "-I{core_usb_dir}" "-I{core_stm32_dir}/OpenAMP" "-I{core_usb_dir}/hid" "-I{core_usb_dir}/cdc" "-I{hal_dir}/Inc" "-I{hal_dir}/Src" "-I{build.system.path}/{build.series}" "-I{usbd_core_dir}/Inc" "-I{usbd_core_dir}/Src" {build.virtio_extra_include}
3637
compiler.arm.cmsis.c.flags="-I{cmsis_dir}/Core/Include/" "-I{cmsis_dev_dir}/Include/" "-I{cmsis_dev_dir}/Source/Templates/gcc/" "-I{cmsis_dir}/DSP/Include" "-I{cmsis_dir}/DSP/PrivateInclude"
3738

3839
compiler.warning_flags=-w

0 commit comments

Comments
 (0)