Skip to content

Conversation

aliphys
Copy link
Contributor

@aliphys aliphys commented Aug 24, 2023

This PR makes some adjustments to the Simple and Advanced sketches.

  • 📛 Renamed sketch names, to be more descriptive of what they do
    • Simple.ino -> SimpleStorageWriteRead.ino
    • Advanced.ino -> AdvancedUSBInternalOperations.ino
  • 📝 Rewrote sketch description in line with the Arduino Writing Style Guide, as refered to at the bottom of this page.
  • SimpleStorageWriteRead.ino now uses the internal storage as default. Rationale is that the SD card is not present in the Opta, and requires additional hardware in the Portenta H7 and C33.
  • Added in line comments to make code operation easier to grasp for newcommers (e.g. explanation of printFolderContents() helper function)

Note: I was not able to compile the examples.

@aliphys aliphys added topic: documentation Related to documentation for the project type: enhancement Proposed improvement labels Aug 24, 2023
@aliphys aliphys force-pushed the aliphys/exampleRevision branch from ed9a82d to 6cf71ea Compare August 25, 2023 06:59
@aliphys
Copy link
Contributor Author

aliphys commented Aug 25, 2023

The errors are reduced with the patches made yesterday, but still present:

Compiling for the Portenta C33

  • SimpleStorageReadWrite.ino - C33
PS D:\Github\Arduino\Arduino_UnifiedStorage\examples\SimpleStorageWriteRead> arduino-cli compile -b arduino:renesas_portenta:portenta_c33  --library "D:\Github\Arduino\Arduino_POSIXStorage" --library  "D:\Github\Arduino\Arduino_UnifiedStorage"
>> 
WARNING: library Arduino_UnifiedStorage claims to run on renesas, mbed_portenta architecture(s) and may be incompatible with your current board which runs on renesas_portenta architecture(s).
In file included from D:\Github\Arduino\Arduino_UnifiedStorage\src/Arduino_UnifiedStorage.h:43:0,
                 from D:\Github\Arduino\Arduino_UnifiedStorage\examples\SimpleStorageWriteRead\SimpleStorageWriteRead.ino:24:
D:\Github\Arduino\Arduino_UnifiedStorage\src/USBStorage.h:9:13: error: redefinition of 'bool available'
 static bool available = false;
             ^~~~~~~~~
D:\Github\Arduino\Arduino_UnifiedStorage\src/USBStorage.h:6:13: note: 'bool available' previously defined here
 static bool available = false;
             ^~~~~~~~~


Used library           Version Path
Arduino_UnifiedStorage 1.0.0   D:\Github\Arduino\Arduino_UnifiedStorage
Arduino_POSIXStorage   1.0.0   D:\Github\Arduino\Arduino_POSIXStorage
FATFilesystem                  C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\FATFilesystem
Storage                        C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\Storage
LittleFilesystem               C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\LittleFilesystem
BlockDevices                   C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\BlockDevices
UsbHostMsd                     C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\UsbHostMsd

Used platform            Version Path
arduino:renesas_portenta 1.0.2   C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2
Error during build: exit status 1
  • AdvancedUSBInternalOperations.ino
PS D:\Github\Arduino\Arduino_UnifiedStorage\examples\AdvancedUSBInternalOperations> arduino-cli compile -b arduino:renesas_portenta:portenta_c33  --library "D:\Github\Arduino\Arduino_POSIXStorage" --library  "D:\Github\Arduino\Arduino_UnifiedStorage"
>> 
WARNING: library Arduino_UnifiedStorage claims to run on renesas, mbed_portenta architecture(s) and may be incompatible with your current board which runs on renesas_portenta architecture(s).
In file included from D:\Github\Arduino\Arduino_UnifiedStorage\src/Arduino_UnifiedStorage.h:43:0,
                 from D:\Github\Arduino\Arduino_UnifiedStorage\examples\AdvancedUSBInternalOperations\AdvancedUSBInternalOperations.ino:26:
D:\Github\Arduino\Arduino_UnifiedStorage\src/USBStorage.h:9:13: error: redefinition of 'bool available'
 static bool available = false;
             ^~~~~~~~~
D:\Github\Arduino\Arduino_UnifiedStorage\src/USBStorage.h:6:13: note: 'bool available' previously defined here
 static bool available = false;
             ^~~~~~~~~


Used library           Version Path
Arduino_UnifiedStorage 1.0.0   D:\Github\Arduino\Arduino_UnifiedStorage
Arduino_POSIXStorage   1.0.0   D:\Github\Arduino\Arduino_POSIXStorage
FATFilesystem                  C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\FATFilesystem
Storage                        C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\Storage
LittleFilesystem               C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\LittleFilesystem
BlockDevices                   C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\BlockDevices
UsbHostMsd                     C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2\libraries\UsbHostMsd

Used platform            Version Path
arduino:renesas_portenta 1.0.2   C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\renesas_portenta\1.0.2
Error during build: exit status 1

Compiling for the Portenta H7

  • SimpleStorageReadWrite.ino
PS D:\Github\Arduino\Arduino_UnifiedStorage\examples\SimpleStorageWriteRead> arduino-cli compile -b arduino:mbed_portenta:envie_m7  --library "D:\Github\Arduino\Arduino_POSIXStorage" --library  "D:\Github\Arduino\Arduino_UnifiedStorage"
>> 
D:\Github\Arduino\Arduino_UnifiedStorage\src\USBStorage.cpp:4:14: fatal error: Arduino_USBHostMbed5.h: No such file or directory
     #include <Arduino_USBHostMbed5.h>
              ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


Used library           Version Path
Arduino_UnifiedStorage 1.0.0   D:\Github\Arduino\Arduino_UnifiedStorage
Arduino_POSIXStorage   1.0.0   D:\Github\Arduino\Arduino_POSIXStorage

Used platform         Version Path
arduino:mbed_portenta 4.0.4   C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.0.4
Error during build: exit status 1
  • AdvancedUSBInternalOperations.ino
PS D:\Github\Arduino\Arduino_UnifiedStorage\examples\AdvancedUSBInternalOperations> arduino-cli compile -b arduino:mbed_portenta:envie_m7  --library "D:\Github\Arduino\Arduino_POSIXStorage" --library  "D:\Github\Arduino\Arduino_UnifiedStorage"       
>> 
D:\Github\Arduino\Arduino_UnifiedStorage\src\USBStorage.cpp:4:14: fatal error: Arduino_USBHostMbed5.h: No such file or directory
     #include <Arduino_USBHostMbed5.h>
              ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


Used library           Version Path
Arduino_UnifiedStorage 1.0.0   D:\Github\Arduino\Arduino_UnifiedStorage
Arduino_POSIXStorage   1.0.0   D:\Github\Arduino\Arduino_POSIXStorage

Used platform         Version Path
arduino:mbed_portenta 4.0.4   C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.0.4
Error during build: exit status 1

@cristidragomir97 cristidragomir97 merged commit 7fcd789 into main Aug 25, 2023
@aliphys aliphys deleted the aliphys/exampleRevision branch August 25, 2023 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants