Skip to content

Commit

Permalink
Merge branch 'release/v0.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerii Koval committed Jul 7, 2023
2 parents f256dfc + 37cef1f commit 72f5aa3
Show file tree
Hide file tree
Showing 27 changed files with 188,276 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Examples

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
example:
- "examples/arduino-blink"
- "examples/arduino-internal-libs"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install -U https://github.com/platformio/platformio/archive/develop.zip
pio pkg install --global --platform symlink://.
- name: Build examples
run: |
pio run -d ${{ matrix.example }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pyc
.piolibdeps
.pio
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
# platform-renesas-ra
Renesas RA: development platform for PlatformIO
# Renesas RA: development platform for [PlatformIO](https://platformio.org)

[![Build Status](https://github.com/platformio/platform-renesas-ra/workflows/Examples/badge.svg)](https://github.com/platformio/platform-renesas-ra/actions)

Renesas Advanced (RA) 32-bit microcontrollers with the Arm Cortex-M33, -M23 and -M4 processor cores deliver key advantages compared to competitive Arm Cortex-M MCUs by providing stronger embedded security, superior CoreMark performance and ultra-low power operation.

* [Home](https://registry.platformio.org/platforms/platformio/renesas-ra) (home page in the PlatformIO Registry)
* [Documentation](https://docs.platformio.org/page/platforms/renesas-ra.html) (advanced usage, packages, boards, frameworks, etc.)

# Usage

1. [Install PlatformIO](https://platformio.org)
2. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:

## Stable version

```ini
[env:stable]
platform = renesas-ra
board = ...
...
```

## Development version

```ini
[env:development]
platform = https://github.com/platformio/platform-renesas-ra.git
board = ...
...
```

# Configuration

Please navigate to [documentation](https://docs.platformio.org/page/platforms/renesas-ra.html).
49 changes: 49 additions & 0 deletions boards/portenta_c33.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"build": {
"arduino": {
"ldscript": "fsp.ld"
},
"extra_flags": [
"-DARDUINO_PORTENTA_C33",
"-DARDUINO_ARCH_RENESAS_PORTENTA",
"-DLWIP_DNS=1",
"-DCFG_TUSB_MCU=OPT_MCU_RAXXX"
],
"core": "arduino",
"cpu": "cortex-m33",
"f_cpu": "200000000L",
"hwids": [
[
"0x2341",
"0x0068"
],
[
"0x2341",
"0x0368"
]
],
"mcu": "r7fa6m5bh2cbg",
"variant": "PORTENTA_C33"
},
"debug": {
"jlink_device": "RA6M5",
"svd_path": "R7FA6M5BH.svd"
},
"frameworks": [
"arduino"
],
"name": "Arduino Portenta C33",
"upload": {
"maximum_ram_size": 523624,
"maximum_size": 2097152,
"native_usb": true,
"protocol": "dfu",
"protocols": [
"dfu",
"jlink"
],
"offset_address": "0x10000"
},
"url": "https://www.arduino.cc/pro/hardware-product-portenta-c33",
"vendor": "Arduino"
}
49 changes: 49 additions & 0 deletions boards/uno_r4_minima.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"build": {
"arduino": {
"ldscript": "fsp.ld"
},
"extra_flags": [
"-DARDUINO_UNOR4_MINIMA",
"-DLWIP_DNS=1",
"-DCFG_TUSB_MCU=OPT_MCU_RAXXX"
],
"core": "arduino",
"cpu": "cortex-m4",
"f_cpu": "48000000L",
"hwids": [
[
"0x2341",
"0x0069"
],
[
"0x2341",
"0x0369"
]
],
"mcu": "ra4m1",
"variant": "MINIMA"
},
"debug": {
"jlink_device": "ra4m1",
"svd_path": "R7FA4M1AB.svd"
},
"frameworks": [
"arduino"
],
"name": "Arduino Uno R4 Minima",
"upload": {
"maximum_ram_size": 32768,
"maximum_size": 262144,
"native_usb": true,
"protocol": "dfu",
"protocols": [
"cmsis-dap",
"dfu",
"jlink"
],
"offset_address": "0x4000"
},
"url": "https://docs.arduino.cc/hardware/uno-r4-minima",
"vendor": "Arduino"
}
56 changes: 56 additions & 0 deletions boards/uno_r4_wifi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"build": {
"arduino": {
"ldscript": "fsp.ld"
},
"extra_flags": [
"-DARDUINO_UNOR4_WIFI",
"-DNO_USB",
"-DBACKTRACE_SUPPORT",
"-DLWIP_DNS=1",
"-DCFG_TUSB_MCU=OPT_MCU_RAXXX"
],
"core": "arduino",
"cpu": "cortex-m4",
"f_cpu": "48000000L",
"hwids": [
[
"0x2341",
"0x1002"
],
[
"0x2341",
"0x006D"
]
],
"mcu": "ra4m1",
"variant": "UNOWIFIR4"
},
"debug": {
"onboard_tools": [
"cmsis-dap"
],
"jlink_device": "ra4m1",
"openocd_config": "openocd.cfg",
"svd_path": "R7FA4M1AB.svd"
},
"frameworks": [
"arduino"
],
"name": "Arduino Uno R4 WiFi",
"upload": {
"maximum_ram_size": 32768,
"maximum_size": 262144,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "sam-ba",
"protocols": [
"cmsis-dap",
"sam-ba",
"jlink"
],
"offset_address": "0x4000"
},
"url": "https://docs.arduino.cc/hardware/uno-r4-wifi",
"vendor": "Arduino"
}
70 changes: 70 additions & 0 deletions builder/frameworks/_bare.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 2014-present PlatformIO <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Default flags for bare-metal programming (without any framework layers)
#

from SCons.Script import DefaultEnvironment

env = DefaultEnvironment()
board = env.BoardConfig()

env.Append(
ASFLAGS=[
"-mthumb",
],
ASPPFLAGS=[
"-x", "assembler-with-cpp",
],

CCFLAGS=[
"-Os", # optimize for size
"-ffunction-sections", # place each function in its own section
"-fdata-sections",
"-Wall",
"-mthumb"
],

CXXFLAGS=[
"-fno-rtti",
"-fno-exceptions"
],

CPPDEFINES=[
("F_CPU", "$BOARD_F_CPU")
],

LINKFLAGS=[
"-Os",
"-Wl,--gc-sections",
"-mthumb",
"--specs=nosys.specs"
],

LIBS=["c", "gcc", "m", "stdc++"]
)

if "BOARD" in env:
env.Append(
ASFLAGS=[
"-mcpu=%s" % board.get("build.cpu")
],
CCFLAGS=[
"-mcpu=%s" % board.get("build.cpu")
],
LINKFLAGS=[
"-mcpu=%s" % board.get("build.cpu")
]
)
Loading

0 comments on commit 72f5aa3

Please sign in to comment.