Skip to content

Fix library.properties for bundled libraries #340

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 22 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
29d6290
Library: make doom lib non legacy
facchinm Oct 5, 2021
7099920
Libraries: modernize USBMSD library
facchinm Oct 5, 2021
a07afd0
Libraries: remove outdeted WiFi bindings
facchinm Oct 5, 2021
70676ea
USBHOST: fix library.properties
facchinm Oct 5, 2021
4c4c50a
Libraries: modernize USBHID library
facchinm Oct 5, 2021
7c8cfce
Libraries: modernize RPC library
facchinm Oct 5, 2021
92f7f53
Libraries: fix various misleading library.properties
facchinm Oct 5, 2021
cd474b8
USBHID: update examples
facchinm Oct 5, 2021
590f115
Libraries: modernize *_System libs
facchinm Oct 5, 2021
606ec02
Fix Portenta_lvgl example
facchinm Oct 5, 2021
06ae571
Doom: fix example sketch and remove binaries
facchinm Oct 5, 2021
f2095ae
Portenta_Video: hide library
facchinm Oct 5, 2021
b5b3aec
Libraries: modernize SDCARD
facchinm Oct 5, 2021
3eae8b7
Libraries: modernize Portenta_Camera
facchinm Oct 5, 2021
cba214e
Libraries: modernize Portenta_SDRAM and add example
facchinm Oct 5, 2021
a109746
Libraries: Portenta_lvgl: fix examples and rename library
facchinm Oct 5, 2021
4424b33
Modernize Portenta_Video and readd example
facchinm Oct 7, 2021
f3de8b0
Apply suggestions from code review
facchinm Oct 8, 2021
981209c
lvgl: add compatibility layer for both v7 and v8
marqdevx Oct 13, 2021
15e344b
Add missing library dependency to "smoke test" CI workflow
per1234 Oct 8, 2021
d600f09
Expand "smoke test" CI workflow to cover new examples
per1234 Oct 8, 2021
0ebf94f
GH: CI: add lvgl v8 to test matrix
facchinm Oct 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,45 @@ jobs:
additional-sketch-paths: |
- libraries/PDM
- libraries/ThreadDebug
- libraries/USBHID
- libraries/USBMSD/examples/Nano33BLE_FlashMassStorage
- board:
fqbn: arduino:mbed:envie_m4
additional-libraries: |
- name: lvgl
additional-sketch-paths: |
- libraries/doom
- libraries/KernelDebug
- libraries/Portenta_SDCARD
- libraries/Portenta_SDRAM
- libraries/Portenta_Video
- libraries/RPC
- board:
fqbn: arduino:mbed:envie_m7
additional-libraries: |
- name: lvgl
version: 7.11.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time I made the suggestion to add this, the code was not compatible with 8.x, so I pinned to the last of the 7.x series. It looks like that limitation has since been lifted. The pin isn't necessary for the sake of the workflow or action so you are free to configure it as you like. I see it was already unpinned for the arduino:mbed:envie_m4 compilations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 , I'd leave one on 7.11 and one on 8.0.2 to make sure it still compiles in both 😉

additional-sketch-paths: |
- libraries/PDM
- libraries/doom
- libraries/KernelDebug
- libraries/Portenta_Camera/examples
- libraries/Portenta_lvgl/examples/Portenta_lvgl
- libraries/Portenta_SDCARD
- libraries/Portenta_SDRAM
- libraries/Portenta_System
- libraries/Portenta_Video
- libraries/RPC
- libraries/ThreadDebug
- libraries/USBHID
- libraries/USBHOST
- libraries/USBMSD/examples/AccessFlashAsUSBDisk
- libraries/WiFi
- board:
fqbn: arduino:mbed:nanorp2040connect
additional-sketch-paths: |
- libraries/PDM
- libraries/USBHID
- ~/Arduino/libraries/WiFiNINA
- board:
fqbn: arduino:mbed:nicla_sense
Expand Down Expand Up @@ -99,6 +112,7 @@ jobs:
fqbn: ${{ matrix.board.fqbn }}
libraries: |
- name: WiFiNINA
${{ matrix.additional-libraries }}
platforms: |
# Use Board Manager to install the latest release of Arduino mbed Boards to get the toolchain
- name: "arduino:mbed"
Expand Down
176 changes: 0 additions & 176 deletions libraries/LittleVGL/examples/Portenta_lvgl/Portenta_lvgl.ino

This file was deleted.

9 changes: 9 additions & 0 deletions libraries/Nano33BLE_System/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=Nano33BLE_System
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tutorial will need to be updated to account for the "Nano33_System" -> "Nano33BLE_System" name change:
https://docs.arduino.cc/tutorials/nano-33-ble-sense/getting-started-omv#updating-the-bootloader

CC: @sebromero

version=1.0
author=Arduino
maintainer=Arduino <[email protected]>
sentence=Utility library for Nano 33 BLE
paragraph=
category=Other
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Nano33BLE_System
architectures=mbed,mbed_nano
9 changes: 9 additions & 0 deletions libraries/Nicla_System/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=Nicla_System
version=1.0
author=Arduino
maintainer=Arduino <[email protected]>
sentence=Utility library for Nicla Sense ME
paragraph=
category=Other
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Nicla_System
architectures=mbed,mbed_nicla
File renamed without changes.
9 changes: 9 additions & 0 deletions libraries/Portenta_Camera/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=Portenta_Camera
version=1.0
author=Arduino
maintainer=Arduino <[email protected]>
sentence=Camera library for Portenta H7 Vision Shield
paragraph=
category=Other
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_Camera
architectures=mbed,mbed_portenta
9 changes: 9 additions & 0 deletions libraries/Portenta_SDCARD/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=Portenta_SDCARD
version=1.0
author=Arduino
maintainer=Arduino <[email protected]>
sentence=SDCARD library for Portenta H7
paragraph=
category=Data Storage
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_SDCARD
architectures=mbed,mbed_portenta
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
How to interact with external SDRAM on Portenta H7

The board comes with an hefty 8MB of external fast RAM, which can be used:
- as a framebuffer (raw mode)
- as an expansion of on-chip RAM to store "standard" data

This example shows both the usages
*/

#include "SDRAM.h"

REDIRECT_STDOUT_TO(Serial);

void nonFrameBuffer() {
// Initilize SDRAM for non-framebuffer operations
SDRAM.begin(); // is the same as SDRAM.begin(SDRAM_START_ADDRESS);

// Now we can malloc() and free() in the whole RAM space
// For example, let's create a 7MB array
uint8_t* myVeryBigArray = (uint8_t*)SDRAM.malloc(7 * 1024 * 1024);

// and a small one
uint8_t* mySmallArray = (uint8_t*)SDRAM.malloc(128);

// and use then as usual
for (int i = 0; i<128; i++) {
myVeryBigArray[i] = i;
mySmallArray[i] = i*2;
}

// free the memory when you don't need them anymore
SDRAM.free(myVeryBigArray);
}

void frameBuffer() {
// In case we want a framebuffer-like area at the beginning of the flash,
// simply initialize the memory as

SDRAM.begin(SDRAM_START_ADDRESS + 2 * 1024 * 1024);
// 2MB of contiguous memory available at the beginning

uint32_t* framebuffer = (uint32_t*)SDRAM_START_ADDRESS;

// We can't allocate anymore the huge 7MB array

uint8_t* myVeryBigArray = (uint8_t*)SDRAM.malloc(7 * 1024 * 1024);
if (myVeryBigArray == NULL) {
Serial.println("Oops, too big :)");
}

}

void setup() {
Serial.begin(115200);
while (!Serial);

frameBuffer();
// Uncomment to test the other functionality
// nonFrameBuffer();

// Sort of memtest for stability, useful for testing when overclocking
if (SDRAM.test()) {
Serial.println("SDRAM completely functional");
}
}

void loop() {

}
9 changes: 9 additions & 0 deletions libraries/Portenta_SDRAM/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=Portenta_SDRAM
version=1.0
author=Arduino
maintainer=Arduino <[email protected]>
sentence=Interact with external SDRAM chip on Portenta H7
paragraph=
category=Other
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_SDRAM
architectures=mbed,mbed_portenta
File renamed without changes.
Empty file.
9 changes: 9 additions & 0 deletions libraries/Portenta_System/library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=Portenta_System
version=1.0
author=Arduino
maintainer=Arduino <[email protected]>
sentence=Utility library for Portenta H7
paragraph=
category=Other
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Portenta_System
architectures=mbed,mbed_portenta
1 change: 1 addition & 0 deletions libraries/Portenta_System/src/Portenta_System.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// placeholder to display the library examples
Empty file.
27 changes: 27 additions & 0 deletions libraries/Portenta_Video/examples/ArduinoLogo/ArduinoLogo.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "Portenta_lvgl.h"
#include "Portenta_Video.h"
#include "image.h"

// Alternatively, any raw RGB565 image can be included on demand using this macro
/*
#define INCBIN_PREFIX
#include "incbin.h"
INCBIN(test, "/home/user/Downloads/test.bin");
*/

int offset;

void setup() {
portenta_init_video();

stm32_LCD_Clear(0);
stm32_LCD_Clear(0);

offset = ((stm32_getXSize() - 300)) + (stm32_getXSize() * (stm32_getYSize() - 300) / 2) * sizeof(uint16_t);
}

void loop() {
// Replace texture_raw with testData if using the INCBIN method
// Also, replace 300x300 resolution with the actual one
stm32_LCD_DrawImage((void*)texture_raw, (void *)(getNextFrameBuffer() + offset), 300, 300, DMA2D_INPUT_RGB565);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const unsigned char texture_raw[] = {
const unsigned char texture_raw[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down
Loading