Skip to content

Commit

Permalink
Add ORGPALX target (nanoframework#2932)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
josesimoes authored May 14, 2024
1 parent 3b9507e commit b9f167f
Show file tree
Hide file tree
Showing 66 changed files with 9,684 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ We also have a [Community Targets](https://github.com/nanoframework/nf-Community
| ST_NUCLEO64_F091RC | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ST_NUCLEO64_F091RC/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ST_NUCLEO64_F091RC/latest/) |
| ST_STM32F769I_DISCOVERY | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ST_STM32F769I_DISCOVERY/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ST_STM32F769I_DISCOVERY/latest/) |
| ORGPAL_PALTHREE | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ORGPAL_PALTHREE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ORGPAL_PALTHREE/latest/) |
| ORGPAL_PALX | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ORGPAL_PALX/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ORGPAL_PALX/latest/) |

### Silicon Labs Giant Gecko boards

Expand Down Expand Up @@ -122,6 +123,7 @@ The above .NET nanoFramework interpreter builds include support for the class li
| ST_NUCLEO64_F091RC | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | |
| ST_STM32F769I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: |
| ORGPAL_PALTHREE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | |
| ORGPAL_PALX | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | |
| SL_STK3701A_REVB | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | | |
| SL_STK3701A | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | | |
| TI_CC1352R1_LAUNCHXL | :heavy_check_mark: | | | | | | | | | | | | | |
Expand All @@ -140,6 +142,7 @@ The above .NET nanoFramework interpreter builds include support for the class li
* [ChibiOS](targets/ChibiOS)
* Reference target boards
* [OrgPal PalThree](targets/ChibiOS/ORGPAL_PALTHREE)
* [OrgPal PalX](targets/ChibiOS/ORGPAL_PALX)
* [ST NUCLEO64 F091RC](targets/ChibiOS/ST_NUCLEO64_F091RC)
* [ST STM32F429I DISCOVERY](targets/ChibiOS/ST_STM32F429I_DISCOVERY)
* [ST STM32F769I DISCOVERY](targets/ChibiOS/ST_STM32F769I_DISCOVERY)
Expand Down
2 changes: 2 additions & 0 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
| ST_NUCLEO64_F091RC | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ST_NUCLEO64_F091RC/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ST_NUCLEO64_F091RC/latest/) |
| ST_STM32F769I_DISCOVERY | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ST_STM32F769I_DISCOVERY/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ST_STM32F769I_DISCOVERY/latest/) |
| ORGPAL_PALTHREE | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ORGPAL_PALTHREE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ORGPAL_PALTHREE/latest/) |
| ORGPAL_PALX | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ORGPAL_PALX/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ORGPAL_PALX/latest/) |

### Silicon Labs Giant Gecko boards

Expand Down Expand Up @@ -121,6 +122,7 @@
| ST_NUCLEO64_F091RC | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | |
| ST_STM32F769I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: |
| ORGPAL_PALTHREE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | |
| ORGPAL_PALX | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | |
| SL_STK3701A_REVB | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | | |
| SL_STK3701A | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | | |
| TI_CC1352R1_LAUNCHXL | :heavy_check_mark: | | | | | | | | | | | | | |
Expand Down
8 changes: 8 additions & 0 deletions azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,14 @@ jobs:
NeedsSRECORD: false
CMakePreset: ORGPAL_PALTHREE

ORGPAL_PALX:
TargetBoard: ORGPAL_PALX
TargetSeries: 'stm32f7xx'
BuildOptions:
NeedsDFU: true
NeedsSRECORD: false
CMakePreset: ORGPAL_PALX

ST_NUCLEO64_F091RC:
TargetBoard: ST_NUCLEO64_F091RC
TargetSeries: 'stm32f0xx'
Expand Down
1 change: 1 addition & 0 deletions targets/ChibiOS/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"version": 4,
"include": [
"ORGPAL_PALTHREE/CMakePresets.json",
"ORGPAL_PALX/CMakePresets.json",
"ST_NUCLEO64_F091RC/CMakePresets.json",
"ST_STM32F429I_DISCOVERY/CMakePresets.json",
"ST_STM32F769I_DISCOVERY/CMakePresets.json"
Expand Down
57 changes: 57 additions & 0 deletions targets/ChibiOS/ORGPAL_PALX/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.
#

include(binutils.common)
include(binutils.ChibiOS)

nf_setup_target_build(
HAS_NANOBOOTER

BOOTER_LINKER_FILE
STM32F76xx_booter

CLR_LINKER_FILE
STM32F76xx_CLR

CLR_EXTRA_SOURCE_FILES
# the next one is required is the target implements and it's using external memory
${CMAKE_CURRENT_SOURCE_DIR}/target_external_memory.c

BOOTER_EXTRA_COMPILE_DEFINITIONS
-DUSBH_DEBUG_MULTI_HOST=0

CLR_EXTRA_COMPILE_DEFINITIONS
-DUSBH_DEBUG_MULTI_HOST=0

BOOTER_EXTRA_LINKMAP_PROPERTIES
",--library-path=${CMAKE_SOURCE_DIR}/targets/ChibiOS/_common,--defsym=__main_stack_size__=0x400,--defsym=__process_stack_size__=0x800,--defsym=__crt_heap_size__=0x2000"

CLR_EXTRA_LINKMAP_PROPERTIES
",--library-path=${CMAKE_SOURCE_DIR}/targets/ChibiOS/_common,--defsym=__main_stack_size__=0x400,--defsym=__process_stack_size__=0x800,--defsym=__crt_heap_size__=0x3B000"
)

# if HEX2DFU tool is available pack the binaries into a DFU package
if(HEX2DFU_TOOL_AVAILABLE)

####################################################################################################
## when changing the linker file make sure to update the new addresses for the image files below ##
## DO NOT use the leading 0x notation, just the address in plain hexadecimal formating ##
####################################################################################################

if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
nf_generate_dfu_package(
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08010000
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
)
else()
nf_generate_dfu_package(
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08010000
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
)
endif()

endif()
55 changes: 55 additions & 0 deletions targets/ChibiOS/ORGPAL_PALX/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": 4,
"include": [
"../../../CMake/arm-gcc.json",
"../../../config/user-tools-repos.json",
"../../../config/user-prefs.json"
],
"configurePresets": [
{
"name": "ORGPAL_PALX",
"inherits": [
"arm-gcc-cortex-preset",
"user-tools-repos",
"user-prefs"
],
"hidden": false,
"cacheVariables": {
"TARGET_BOARD": "ORGPAL_PALX",
"TARGET_SERIES": "STM32F7xx",
"RTOS": "ChibiOS",
"CHIBIOS_CONTRIB_REQUIRED": "ON",
"STM32_CUBE_PACKAGE_REQUIRED": "ON",
"SUPPORT_ANY_BASE_CONVERSION": "ON",
"NF_FEATURE_DEBUGGER": "ON",
"NF_FEATURE_RTC": "ON",
"NF_FEATURE_HAS_SDCARD": "ON",
"NF_FEATURE_HAS_CONFIG_BLOCK": "ON",
"NF_FEATURE_HAS_USB_MSD": "ON",
"NF_FEATURE_USE_SPIFFS": "ON",
"NF_FEATURE_HAS_ACCESSIBLE_STORAGE": "ON",
"NF_BUILD_RTM": "OFF",
"API_System.Math": "ON",
"API_Hardware.Stm32": "ON",
"API_System.Device.Gpio": "ON",
"API_System.Device.Spi": "ON",
"API_System.Device.I2c": "ON",
"API_System.Device.Pwm": "ON",
"API_System.IO.Ports": "ON",
"API_System.Device.Adc": "ON",
"API_System.Device.Dac": "ON",
"API_nanoFramework.ResourceManager": "ON",
"API_nanoFramework.System.Collections": "ON",
"API_nanoFramework.System.Text": "ON"
}
}
],
"buildPresets": [
{
"inherits": "base-user",
"name": "ORGPAL_PALX",
"displayName": "ORGPAL_PALX",
"configurePreset": "ORGPAL_PALX"
}
]
}
34 changes: 34 additions & 0 deletions targets/ChibiOS/ORGPAL_PALX/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Configuration of ChibiOS, HAL and MCU

For a successful build the following changes are required:

For memory maps, uuid etc. the reference document used was: http://www.st.com/content/ccc/resource/technical/document/reference_manual/group0/96/8b/0d/ec/16/22/43/71/DM00224583/files/DM00224583.pdf/jcr:content/translations/en.DM00224583.pdf

In _halconf.g_ (in both nanoBooter and nanoCLR folders), when compared with a default file available from (https://github.com/ChibiOS/ChibiOS/tree/master/demos/STM32/RT-STM32F769I-DISCOVERY):
- HAL_USE_SERIAL_USB to TRUE
- HAL_USE_USB to TRUE
- SERIAL_DEFAULT_BITRATE to 921600

In _mcuconf.h_ (in both nanoBooter and nanoCLR folders), when compared with a default file available from (https://github.com/ChibiOS/ChibiOS/tree/master/demos/STM32/RT-STM32F769I-DISCOVERY):
- STM32_SERIAL_USE_USART2 to TRUE
- STM32_USB_USE_OTG1 to TRUE

NOTE: this configuration was successfully tested in an ST_STM32F769I_DISCOVERY board using the Serial over USB connection on USB port 1 that creates a virtual COM port.

## ADC configurations

The following ADC channels (and respective GPIO pins) are available to the managed API, in the respective index:
- PA6, ADC1 IN6
- PA4 ADC1 IN4
- PC2 ADC1 IN12
- PF10 ADC1 IN8
- PF8 ADC3 IN6
- PB8 ADC3 IN7
- Temp Sensor ADC1
- VrefInt ADC1
- Vbatt ADC1

## Floating point

The current build is set to add support for single-precision floating point.
Meaning that `System.Math` API supports only the `float` overloads. The `double` ones will throw a `NotImplementedException`.
Loading

0 comments on commit b9f167f

Please sign in to comment.