Repository navigation
control: add PSoC Control variant #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
variants/kit_psc3m5_evk_psc3m5fds2afq1/kit_psc3m5_evk_psc3m5fds2afq1.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # | ||
| # Copyright (c) Arduino s.r.l. and/or its affiliated companies | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # NOTE: The board defconfig already provides: | ||
| # CONFIG_ARM_MPU=y | ||
| # CONFIG_HW_STACK_PROTECTION=y | ||
| # CONFIG_TRUSTED_EXECUTION_SECURE=y | ||
| # CONFIG_GPIO=y | ||
| # CONFIG_CLOCK_CONTROL=y | ||
| # CONFIG_CONSOLE=y | ||
| # CONFIG_UART_CONSOLE=y | ||
| # CONFIG_SERIAL=y | ||
| # CONFIG_ARM_TRUSTZONE_M=y | ||
|
|
||
| # This board only exposes 64KB of secure RAM. The loader's default | ||
| # heap/stack sizes (32KB each) alone consume all of it, overflowing | ||
| # RAM. Shrink them to fit. | ||
| CONFIG_MAIN_STACK_SIZE=4096 | ||
| CONFIG_HEAP_MEM_POOL_SIZE=16384 | ||
| CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1024 | ||
|
|
||
| # Default LLEXT heap (32KB) plus the above still leaves almost no headroom | ||
| # for the kernel/drivers on this 64KB chip, corrupting RAM at boot. Shrink | ||
| # it too; small sketches don't need a large extension heap. | ||
| CONFIG_LLEXT_HEAP_SIZE=16 | ||
|
|
||
| CONFIG_LLEXT_STORAGE_WRITABLE=n | ||
|
|
||
| CONFIG_CAN=y | ||
|
|
||
| # OpenOCD programs internal flash; the loader reads the sketch directly through | ||
| # its memory-mapped secure address. The board's flash controller is disabled, | ||
| # so runtime flash operations (including flash-map-based OTA) are unavailable. | ||
| CONFIG_FLASH=n | ||
| CONFIG_FLASH_MAP=n | ||
|
|
||
| CONFIG_SHARED_INTERRUPTS=y | ||
|
|
||
| CONFIG_BOOT_BANNER=n | ||
|
|
||
| CONFIG_ARM_MPU=n | ||
| CONFIG_HW_STACK_PROTECTION=n | ||
|
|
||
| CONFIG_BOOTLOADER_MCUBOOT=n | ||
55 changes: 55 additions & 0 deletions
55
variants/kit_psc3m5_evk_psc3m5fds2afq1/kit_psc3m5_evk_psc3m5fds2afq1.overlay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| /* | ||
| * Copyright (c) Arduino s.r.l. and/or its affiliated companies | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /* | ||
| * Minimal Arduino overlay for the Infineon KIT_PSC3M5_EVK. | ||
| * | ||
| * This board defines real GPIOs and the UART node in the upstream Zephyr DTS: | ||
| * - user LED aliases: user_led0 -> GPIO port 8 pin 5, user_led1 -> GPIO port 8 pin 4 | ||
| * - user buttons: SW_1 -> GPIO port 5 pin 0, SW_2 -> GPIO port 2 pin 0 | ||
| * - serial console: uart3 -> scb3 on pins P6_3/P6_2 | ||
| * | ||
| * The upstream board DTS does not define an Arduino Uno R3 header or a PWM/ADC | ||
| * alias table, so this file maps the board-defined GPIOs directly instead of | ||
| * inventing a non-existent Arduino header pin map. | ||
| */ | ||
|
|
||
| &flash0 { | ||
| partitions { | ||
| compatible = "fixed-partitions"; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
|
|
||
| /* Offset within flash0; keep the first 128 KiB for the loader. */ | ||
| user_sketch: partition@20000 { | ||
| label = "user_sketch"; | ||
| reg = <0x20000 DT_SIZE_K(56)>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| / { | ||
| zephyr,user { | ||
| digital-pin-gpios = <&gpio_prt5 0 0>, /* D0 / SW_1 */ | ||
| <&gpio_prt2 0 0>, /* D1 / SW_2 */ | ||
| <&gpio_prt8 5 GPIO_ACTIVE_LOW>, /* D2 / LED_0 */ | ||
| <&gpio_prt8 4 GPIO_ACTIVE_LOW>; /* D3 / LED_1 */ | ||
|
|
||
| builtin-led-gpios = <&gpio_prt8 5 GPIO_ACTIVE_LOW>, | ||
| <&gpio_prt8 4 GPIO_ACTIVE_LOW>; | ||
|
|
||
| serials = <&uart3>; | ||
| cans = <&can1>; | ||
| }; | ||
| }; | ||
|
|
||
| &uart3 { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &rtc0 { | ||
| status = "okay"; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| targets psc3.cm33 | ||
|
|
||
| telnet_port disabled | ||
| init | ||
| reset init | ||
| halt | ||
| flash write_image erase "${filename0}" | ||
| if {[info exists filename1] && [string length $filename1] > 0} { | ||
| flash write_image erase "${filename1}" ${offset} bin | ||
| } | ||
| reset run | ||
| shutdown | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /* | ||
| * Copyright (c) Arduino s.r.l. and/or its affiliated companies | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #ifndef __PINS_ARDUINO__ | ||
| #define __PINS_ARDUINO__ | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| /* | ||
| * Minimal Arduino-style pin map for the Infineon KIT_PSC3M5_EVK. | ||
| * | ||
| * This board exposes its real GPIOs in the Zephyr DTS and we mapped the | ||
| * Arduino-style aliases to the actual board-defined GPIOs in the overlay. | ||
| * The mapping here is intentionally conservative and matches the board's | ||
| * runtime GPIO layout without inventing a non-existent Uno R3 header. | ||
| */ | ||
|
|
||
| #define PINS_COUNT (4u) | ||
|
djaumann marked this conversation as resolved.
|
||
| #define NUM_DIGITAL_PINS (4u) | ||
| #define NUM_ANALOG_INPUTS (0u) | ||
| #define NUM_ANALOG_OUTPUTS (0u) | ||
|
|
||
| #define PIN_LED (2u) | ||
| #define LED_BUILTIN PIN_LED | ||
|
|
||
| /* Arduino-style digital pins used by the board overlay */ | ||
| #define PIN_D0 (0u) | ||
| #define PIN_D1 (1u) | ||
| #define PIN_D2 (2u) | ||
| #define PIN_D3 (3u) | ||
|
|
||
| /* | ||
| * If the board gains ADC-capable GPIOs in the future, these can be mapped here | ||
| * and exposed as A0..A7 in the same way as the rest of the ArduinoCore-zephyr | ||
| * variants. For now the board DTS only exposes the user GPIOs/LEDs and UART. | ||
| */ | ||
| #define PIN_A0 (0u) | ||
| #define PIN_A1 (1u) | ||
| #define PIN_A2 (2u) | ||
| #define PIN_A3 (3u) | ||
| #define PIN_A4 (4u) | ||
| #define PIN_A5 (5u) | ||
| #define PIN_A6 (6u) | ||
| #define PIN_A7 (7u) | ||
|
|
||
| #define PIN_SERIAL_RX (0u) | ||
| #define PIN_SERIAL_TX (1u) | ||
|
|
||
| #define SERIAL_HOWMANY (1u) | ||
| #define SERIAL1_TX (1u) | ||
| #define SERIAL1_RX (0u) | ||
|
|
||
| #define SERIAL_PORT_HARDWARE Serial1 | ||
| #define SERIAL_PORT_MONITOR Serial | ||
|
|
||
| #define WIRE_HOWMANY (0u) | ||
|
|
||
| #endif /* __PINS_ARDUINO__ */ | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.