Skip to content

Commit 73f24e7

Browse files
authored
Merge pull request #340 from facchinm/add_library_properties
Fix library.properties for bundled libraries
2 parents d26ca9b + 0ebf94f commit 73f24e7

File tree

280 files changed

+2323
-311
lines changed

Some content is hidden

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

280 files changed

+2323
-311
lines changed

Diff for: .github/workflows/compile-examples.yml

+14
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,45 @@ jobs:
4646
additional-sketch-paths: |
4747
- libraries/PDM
4848
- libraries/ThreadDebug
49+
- libraries/USBHID
50+
- libraries/USBMSD/examples/Nano33BLE_FlashMassStorage
4951
- board:
5052
fqbn: arduino:mbed:envie_m4
53+
additional-libraries: |
54+
- name: lvgl
5155
additional-sketch-paths: |
5256
- libraries/doom
5357
- libraries/KernelDebug
5458
- libraries/Portenta_SDCARD
59+
- libraries/Portenta_SDRAM
5560
- libraries/Portenta_Video
5661
- libraries/RPC
5762
- board:
5863
fqbn: arduino:mbed:envie_m7
64+
additional-libraries: |
65+
- name: lvgl
66+
version: 7.11.0
5967
additional-sketch-paths: |
6068
- libraries/PDM
6169
- libraries/doom
6270
- libraries/KernelDebug
6371
- libraries/Portenta_Camera/examples
72+
- libraries/Portenta_lvgl/examples/Portenta_lvgl
6473
- libraries/Portenta_SDCARD
74+
- libraries/Portenta_SDRAM
6575
- libraries/Portenta_System
6676
- libraries/Portenta_Video
6777
- libraries/RPC
6878
- libraries/ThreadDebug
79+
- libraries/USBHID
6980
- libraries/USBHOST
81+
- libraries/USBMSD/examples/AccessFlashAsUSBDisk
7082
- libraries/WiFi
7183
- board:
7284
fqbn: arduino:mbed:nanorp2040connect
7385
additional-sketch-paths: |
7486
- libraries/PDM
87+
- libraries/USBHID
7588
- ~/Arduino/libraries/WiFiNINA
7689
- board:
7790
fqbn: arduino:mbed:nicla_sense
@@ -99,6 +112,7 @@ jobs:
99112
fqbn: ${{ matrix.board.fqbn }}
100113
libraries: |
101114
- name: WiFiNINA
115+
${{ matrix.additional-libraries }}
102116
platforms: |
103117
# Use Board Manager to install the latest release of Arduino mbed Boards to get the toolchain
104118
- name: "arduino:mbed"

Diff for: libraries/LittleVGL/examples/Portenta_lvgl/Portenta_lvgl.ino

-176
This file was deleted.

Diff for: libraries/Nano33BLE_System/library.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Nano33BLE_System
2+
version=1.0
3+
author=Arduino
4+
maintainer=Arduino <[email protected]>
5+
sentence=Utility library for Nano 33 BLE
6+
paragraph=
7+
category=Other
8+
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Nano33BLE_System
9+
architectures=mbed,mbed_nano

Diff for: libraries/Nicla_System/library.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Nicla_System
2+
version=1.0
3+
author=Arduino
4+
maintainer=Arduino <[email protected]>
5+
sentence=Utility library for Nicla Sense ME
6+
paragraph=
7+
category=Other
8+
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Nicla_System
9+
architectures=mbed,mbed_nicla
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: libraries/Portenta_Camera/library.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Portenta_Camera
2+
version=1.0
3+
author=Arduino
4+
maintainer=Arduino <[email protected]>
5+
sentence=Camera library for Portenta H7 Vision Shield
6+
paragraph=
7+
category=Other
8+
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_Camera
9+
architectures=mbed,mbed_portenta
File renamed without changes.
File renamed without changes.

Diff for: libraries/Portenta_SDCARD/library.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Portenta_SDCARD
2+
version=1.0
3+
author=Arduino
4+
maintainer=Arduino <[email protected]>
5+
sentence=SDCARD library for Portenta H7
6+
paragraph=
7+
category=Data Storage
8+
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_SDCARD
9+
architectures=mbed,mbed_portenta
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
How to interact with external SDRAM on Portenta H7
3+
4+
The board comes with an hefty 8MB of external fast RAM, which can be used:
5+
- as a framebuffer (raw mode)
6+
- as an expansion of on-chip RAM to store "standard" data
7+
8+
This example shows both the usages
9+
*/
10+
11+
#include "SDRAM.h"
12+
13+
REDIRECT_STDOUT_TO(Serial);
14+
15+
void nonFrameBuffer() {
16+
// Initilize SDRAM for non-framebuffer operations
17+
SDRAM.begin(); // is the same as SDRAM.begin(SDRAM_START_ADDRESS);
18+
19+
// Now we can malloc() and free() in the whole RAM space
20+
// For example, let's create a 7MB array
21+
uint8_t* myVeryBigArray = (uint8_t*)SDRAM.malloc(7 * 1024 * 1024);
22+
23+
// and a small one
24+
uint8_t* mySmallArray = (uint8_t*)SDRAM.malloc(128);
25+
26+
// and use then as usual
27+
for (int i = 0; i<128; i++) {
28+
myVeryBigArray[i] = i;
29+
mySmallArray[i] = i*2;
30+
}
31+
32+
// free the memory when you don't need them anymore
33+
SDRAM.free(myVeryBigArray);
34+
}
35+
36+
void frameBuffer() {
37+
// In case we want a framebuffer-like area at the beginning of the flash,
38+
// simply initialize the memory as
39+
40+
SDRAM.begin(SDRAM_START_ADDRESS + 2 * 1024 * 1024);
41+
// 2MB of contiguous memory available at the beginning
42+
43+
uint32_t* framebuffer = (uint32_t*)SDRAM_START_ADDRESS;
44+
45+
// We can't allocate anymore the huge 7MB array
46+
47+
uint8_t* myVeryBigArray = (uint8_t*)SDRAM.malloc(7 * 1024 * 1024);
48+
if (myVeryBigArray == NULL) {
49+
Serial.println("Oops, too big :)");
50+
}
51+
52+
}
53+
54+
void setup() {
55+
Serial.begin(115200);
56+
while (!Serial);
57+
58+
frameBuffer();
59+
// Uncomment to test the other functionality
60+
// nonFrameBuffer();
61+
62+
// Sort of memtest for stability, useful for testing when overclocking
63+
if (SDRAM.test()) {
64+
Serial.println("SDRAM completely functional");
65+
}
66+
}
67+
68+
void loop() {
69+
70+
}

Diff for: libraries/Portenta_SDRAM/library.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Portenta_SDRAM
2+
version=1.0
3+
author=Arduino
4+
maintainer=Arduino <[email protected]>
5+
sentence=Interact with external SDRAM chip on Portenta H7
6+
paragraph=
7+
category=Other
8+
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_SDRAM
9+
architectures=mbed,mbed_portenta
File renamed without changes.
File renamed without changes.

Diff for: libraries/Portenta_System/Portenta_System.h

Whitespace-only changes.

Diff for: libraries/Portenta_System/library.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Portenta_System
2+
version=1.0
3+
author=Arduino
4+
maintainer=Arduino <[email protected]>
5+
sentence=Utility library for Portenta H7
6+
paragraph=
7+
category=Other
8+
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_System
9+
architectures=mbed,mbed_portenta

Diff for: libraries/Portenta_System/src/Portenta_System.h

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// placeholder to display the library examples

Diff for: libraries/Portenta_Video/.development

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include "Portenta_lvgl.h"
2+
#include "Portenta_Video.h"
3+
#include "image.h"
4+
5+
// Alternatively, any raw RGB565 image can be included on demand using this macro
6+
/*
7+
#define INCBIN_PREFIX
8+
#include "incbin.h"
9+
INCBIN(test, "/home/user/Downloads/test.bin");
10+
*/
11+
12+
int offset;
13+
14+
void setup() {
15+
portenta_init_video();
16+
17+
stm32_LCD_Clear(0);
18+
stm32_LCD_Clear(0);
19+
20+
offset = ((stm32_getXSize() - 300)) + (stm32_getXSize() * (stm32_getYSize() - 300) / 2) * sizeof(uint16_t);
21+
}
22+
23+
void loop() {
24+
// Replace texture_raw with testData if using the INCBIN method
25+
// Also, replace 300x300 resolution with the actual one
26+
stm32_LCD_DrawImage((void*)texture_raw, (void *)(getNextFrameBuffer() + offset), 300, 300, DMA2D_INPUT_RGB565);
27+
}

Diff for: libraries/Portenta_Video/examples/Envie_video_coreboot/image_320x240_argb8888.h renamed to libraries/Portenta_Video/examples/ArduinoLogo/image.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const unsigned char texture_raw[] = {
1+
const unsigned char texture_raw[] = {
22
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

0 commit comments

Comments
 (0)