Forum Rule: Always post complete source code & details to reproduce any issue!
Page 11 of 32 FirstFirst ... 9 10 11 12 13 21 ... LastLast
Results 251 to 275 of 798

Thread: Teensy 4.1 Beta Test

  1. #251
    Senior Member
    Join Date
    Oct 2017
    Location
    Houston
    Posts
    447
    Still stepping through some simple regression testing, so please ignore if others have done. Just tested SD lib functionality, and examples ran fine. Was able to write and read and list files with no issues.
    Initializing SD card...initialization done.
    DATALOG.TXT 184680
    done!

  2. #252
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,720
    Quote Originally Posted by PaulStoffregen View Post
    I suppose this is the moment for jokes about "640K will be enough for everyone".
    E.G.
    - high speed data recording
    - long delay reverberation simulation
    may benefit from larger memory

  3. #253
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    Quote Originally Posted by Don Kelly View Post
    Still stepping through some simple regression testing, so please ignore if others have done. Just tested SD lib functionality, and examples ran fine. Was able to write and read and list files with no issues.
    Initializing SD card...initialization done.
    DATALOG.TXT 184680
    done!
    Good regression process Don, some general first pass was made with early beta boards - but knowing it works now weeks later after those using them diverged to alternate things - is good it is still solid and repeatable on current boards and TD release.

  4. #254
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    Another thread showing issue with T_4.0 and Rev D audio - worked here. Compiled and uploaded to T_4.1 with it's own Rev D and that also worked:

    tested it with the example code from "Audio/Tutorial/Part_1_02_Hardware_Test" and the "Audio/Synthesis/Guitar" example on (…) Teensyduino (…) 1.52 Beta #4
    Also confirmed the code here {FFT-on-Teesy-4} to work on T_4.0 and T_4.1 with FFT fed from AudioInputAnalog - though with TD 1.52 B4 it fails to build on T_3.6

  5. #255
    Senior Member
    Join Date
    Oct 2017
    Location
    Houston
    Posts
    447
    Thanks defragster, I've got a dozen tests I'm planning to run through, including displays, IMUs, DC and stepper motors, SPI motor encoder, AHRS algorithms, GPS interfaces and datalogging, and more. These early ones are pretty basic, but others more complex. Am following others' testing and discussions, as it's very interesting to see!

  6. #256
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,830
    I just soldered my W25Q128JVSIQ chip to the Teensy 4.1 beta, and I was trying to test it out with SPIFFS.

    I downloaded:


    There doesn't seem to be a spiffs-config.h file. There is one in the default sub-directory, but that seems to be more geared towards testing under Linux. Is there an appropriate spiffs-config.h for the Teensy 4.1?

  7. #257
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    Quote Originally Posted by MichaelMeissner View Post
    I just soldered my W25Q128JVSIQ chip to the Teensy 4.1 beta, and I was trying to test it out with SPIFFS.

    I downloaded:


    There doesn't seem to be a spiffs-config.h file. There is one in the default sub-directory, but that seems to be more geared towards testing under Linux. Is there an appropriate spiffs-config.h for the Teensy 4.1?
    @mjs513 redid this to be cleaner and I haven't looked in recent weeks - my version is in '...\libraries\SPIFFS\src\spiffs_config.h' { dated 4 March. }

    WAIT … you want … github.com/PaulStoffregen/teensy41_extram/tree/master/extRAM_SPIFFS_t4

    'pellepl/spiffs' is what FrankB pulled in to start with

  8. #258
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    Getting there … :: SPIFFStest.zip Copy the zip to your libraries folder

    That is in :: github.com/PaulStoffregen/teensy41_extram/blob/master/test/SPIFFStest.zip

    Copied as:: "...\libraries\SPIFFS"

  9. #259
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    @MichaelMeissner - Compiling and running : \libraries\extRAM_SPIFFS_t4\examples\flashtest6\fl ashtest6.ino

    That works … but … Uses the PSRAM - not the FLASH. Looking for a FLASH example …

    @mjs513 - this example won't build :: ...\libraries\extRAM_SPIFFS_t4\examples\eram_spiff s_partv3\eram_spiffs_partv3.ino
    Code:
    "T:\\TEMP\\arduino_build_eram_spiffs_partv3.ino\\sketch\\eram_spiffs_partv3.ino.cpp" -o "T:\\TEMP\\arduino_build_eram_spiffs_partv3.ino\\sketch\\eram_spiffs_partv3.ino.cpp.o"
    T:\tCode\libraries\extRAM_SPIFFS_t4\examples\eram_spiffs_partv3\eram_spiffs_partv3.ino: In function 'void setup()':
    T:\tCode\libraries\extRAM_SPIFFS_t4\examples\eram_spiffs_partv3\eram_spiffs_partv3.ino:53:37: error: no matching function for call to 'extRAM_t4::begin(uint8_t&, uint8_t&)'
         eRAM.begin(config, spiffs_region);
                                         ^
    In file included from T:\tCode\libraries\extRAM_SPIFFS_t4\examples\eram_spiffs_partv3\eram_spiffs_partv3.ino:13:0:
    T:\tCode\libraries\extRAM_SPIFFS_t4/extRAM_t4.h:73:10: note: candidate: int8_t extRAM_t4::begin(uint8_t)
      int8_t  begin(uint8_t _config);
              ^
    T:\tCode\libraries\extRAM_SPIFFS_t4/extRAM_t4.h:73:10: note:   candidate expects 1 argument, 2 provided
    T:\tCode\libraries\extRAM_SPIFFS_t4\examples\eram_spiffs_partv3\eram_spiffs_partv3.ino:64:35: error: no matching function for call to 'extRAM_t4::begin(uint8_t&, uint8_t&)'
       eRAM.begin(config, spiffs_region);
                                       ^
    In file included from T:\tCode\libraries\extRAM_SPIFFS_t4\examples\eram_spiffs_partv3\eram_spiffs_partv3.ino:13:0:
    T:\tCode\libraries\extRAM_SPIFFS_t4/extRAM_t4.h:73:10: note: candidate: int8_t extRAM_t4::begin(uint8_t)
      int8_t  begin(uint8_t _config);
              ^
    
    //...

  10. #260
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    I didn't find a FLASH_ONLY SPIFFS example - created one :: github.com/PaulStoffregen/teensy41_extram/tree/master/extRAM_SPIFFS_t4/examples/flashtest7Fl
    >> Very Simple - I just pulled all the ERAM test direct addressing tests and options - maybe too many … was anxious to see it work.

    Grab the whole ZIP for : github.com/PaulStoffregen/teensy41_extram

    Extract to sketchbook\libraries\extRAM_SPIFFS_t4 the : github.com/PaulStoffregen/teensy41_extram/tree/master/extRAM_SPIFFS_t4

    Extract to sketchbook\libraries\SPIFFS the : github.com/PaulStoffregen/teensy41_extram/blob/master/test/SPIFFStest.zip

  11. #261
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,830
    Quote Originally Posted by defragster View Post
    Getting there … :: SPIFFStest.zip Copy the zip to your libraries folder

    That is in :: github.com/PaulStoffregen/teensy41_extram/blob/master/test/SPIFFStest.zip

    Copied as:: "...\libraries\SPIFFS"
    I downloaded that, deleted the other spiffs, extRAM_SPIFFS_t4, and extRAM_tr directories. The example spiffstest_internal_flash seems to work. Thanks.

    I do get the following message, which I ignored:
    Code:
    WARNING: library SPIFFStest claims to run on Teensy architecture(s) and may be incompatible with your current board which runs on avr architecture(s).

  12. #262
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    Double check - 'internal Flash' may be using upper area of T_4.1 onboard 8 MB FLASH ????

    for: extRAM_SPIFFS_t4/examples/flashtest7Fl
    Added back to call loopTest2 when '2' is entered from SerMon.
    >> Press 'y' on start to fresh format the FLASH chip - other or wait 6 seconds to skip
    >> Press '2' to write/add another file to FLASH

    Unplug T_4.1 with FLASH and on power up the file list shows they exist

  13. #263
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    Finally found that obscenely old first { ...\libraries\SPIFFS\examples\spiffstest_internal_ flash\spiffstest_internal_flash.ino } FrankB FUN example. That does early direct access to FLASH.

    This from that code - puts a 1MB image 4MB into the T_4.1 flash::
    Code:
    const unsigned long _startFS = 0x60000000UL + ((unsigned)&_flashimagelen & ~0x3fff) + 0x4000;
    That - from the t41.ld is the onboard T_4.1 FLASH:
    Code:
    FLASH (rwx): ORIGIN = 0x60000000, LENGTH = 7936K
    See posts #260/#262 to get the just updated 'Modern Improved SPIFFS on QSPI FLASH'.

  14. #264
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    The TEENSY versus AVR error is from the file:: T:\tCode\libraries\SPIFFS\library.properties

    It should not read 'Teensy' but :: architectures=avr

    That Zip was packed on 15 Februrary before that got edited

    Maybe there is another way to get the SPIFFS library @mjs513 ?? - it should be non-zip as a FOLDER in teensy41_extram-master on the top level like the others.

    <edit> Win Github Desktop acting wrong putting SPIFFS library as top level folder - calls it SSPIFS - and 'no files'
    Last edited by defragster; 05-07-2020 at 06:40 AM.

  15. #265
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,830
    Here is what the internal ram test gives:

    Code:
    SPIFFS filesystem starts at: 0x60010000
    
    mount res: 0
    --> Test Start ...
    --> Hello World! What a wonderful World :) <--
    --> ... Test Middle ... 
    --> --> xxxxxx <--
    --> ... Test Middle ... 
    --> --> Hello World! What a wonderful World :) <--
    --> ... Test Middle ... 
    --> Hello World! What a wonderful World :) <--
    --> ... Test End.
    In building flash7FL, I get version skew if I install extRAM_t4. If I install extRAM_SPIFFS_t4, I get some warnings:
    Code:
    WARNING: library SPIFFStest claims to run on Teensy architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp: In member function 'void extRAM_t4::readWord(uint32_t, uint16_t*)':
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:538:47: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      *value = *reinterpret_cast<uint16_t *>(buffer);
                                                   ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp: In member function 'void extRAM_t4::readLong(uint32_t, uint32_t*)':
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:565:47: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      *value = *reinterpret_cast<uint32_t *>(buffer);
                                                   ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp: At global scope:
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:650:72: warning: cannot declare member function 'static void extRAM_t4::flexspi_ip_command(uint32_t, uint32_t)' to have static linkage [-fpermissive]
     static void extRAM_t4::flexspi_ip_command(uint32_t index, uint32_t addr)
                                                                            ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:663:98: warning: cannot declare member function 'static void extRAM_t4::flexspi_ip_read(uint32_t, uint32_t, void*, uint32_t)' to have static linkage [-fpermissive]
     static void extRAM_t4::flexspi_ip_read(uint32_t index, uint32_t addr, void *data, uint32_t length)
                                                                                                      ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:706:105: warning: cannot declare member function 'static void extRAM_t4::flexspi_ip_write(uint32_t, uint32_t, const void*, uint32_t)' to have static linkage [-fpermissive]
     static void extRAM_t4::flexspi_ip_write(uint32_t index, uint32_t addr, const void *data, uint32_t length)
                                                                                                             ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:885:50: warning: cannot declare member function 'static bool extRAM_t4::waitFlash(uint32_t)' to have static linkage [-fpermissive]
     static bool extRAM_t4::waitFlash(uint32_t timeout) {
                                                      ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:934:71: warning: cannot declare member function 'static s32_t extRAM_t4::spiffs_read(u32_t, u32_t, u8_t*)' to have static linkage [-fpermissive]
     static s32_t extRAM_t4::spiffs_read(u32_t addr, u32_t size, u8_t * dst) {
                                                                           ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:946:72: warning: cannot declare member function 'static s32_t extRAM_t4::spiffs_write(u32_t, u32_t, u8_t*)' to have static linkage [-fpermissive]
     static s32_t extRAM_t4::spiffs_write(u32_t addr, u32_t size, u8_t * src) {
                                                                            ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:961:56: warning: cannot declare member function 'static s32_t extRAM_t4::fs_erase(u32_t, u32_t)' to have static linkage [-fpermissive]
     static s32_t extRAM_t4::fs_erase(u32_t addr, u32_t size) {
                                                            ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp: In member function 'virtual size_t extRAM_t4::write(const uint8_t*, size_t)':
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:987:27: warning: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'const char*' [-fpermissive]
      f_write(fd1, buffer, size);
                               ^
    /home/meissner/Arduino/libraries/extRAM_SPIFFS_t4/extRAM_t4.cpp:803:5: note:   initializing argument 2 of 'int extRAM_t4::f_write(spiffs_file, const char*, int)'
     int extRAM_t4::f_write(spiffs_file fd, const char *dst, int szLen) {
         ^
    Sketch uses 55520 bytes (0%) of program storage space. Maximum is 8126464 bytes.
    Global variables use 82612 bytes (15%) of dynamic memory, leaving 441676 bytes for local variables. Maximum is 524288 bytes.
    And it appears to run:

    Code:
    /shared/arduino/tests/flashtest7FL/flashtest7FL.ino May  7 2020 02:53:01
    
     Enter 'y' in 6 seconds to format FlashChip - other to skip
    
    Mount SPIFFS:
    hardware initialized
    FLASH ID: EF 40 18 00 00 00 00 00
    at 0x 1000000
    Mount ADDR 0x1000000 with res: 0
    Write file:
    Hello World! What a wonderful World :)
    
    Directory contents:
    my_file1 [0001] size:38
    Read file:
    Hello World! What a wonderful World :)
    
    
    Mount SPIFFS:
    Mount ADDR 0x1000000 with res: 0
    Directory contents:
    my_file1 [0001] size:38
    I also did it with erasing the memory:

    Code:
    /shared/arduino/tests/flashtest7FLx/flashtest7FLx.ino May  7 2020 03:06:29
    
     Enter 'y' in 6 seconds to format FlashChip - other to skip
    hardware initialized
    FLASH ID: EF 40 18 00 00 00 00 00
    at 0x 1000000
    Erasing... (may take some time)
    .......................................................
    Chip erased in 27 seconds.
    
    Mount SPIFFS:
    hardware initialized
    FLASH ID: EF 40 18 00 00 00 00 00
    at 0x 1000000
    Mount ADDR 0x1000000 with res: 0
    Write file:
    Hello World! What a wonderful World :)
    
    Directory contents:
    my_file1 [0001] size:38
    Read file:
    Hello World! What a wonderful World :)
    
    
    Mount SPIFFS:
    Mount ADDR 0x1000000 with res: 0
    Directory contents:
    my_file1 [0001] size:38
    Note, the flashtest7FL had a case sensitive filename typo. The directory is named flashtest7Fl (the last 'l' is lower case), while the actual file is flashtest7FL.ino (the last 'L' is upper case). On Linux, the Arduino IDE doesn't like this, so I just put the file in a directory called flashtest7FL

    Of course after seeing this run a few times, I now have Louis Armstrong's It's a Wonderful World running through my head.

  16. #266
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,195
    Quote Originally Posted by MichaelMeissner View Post
    Here is what the internal ram test gives:

    Note, the flashtest7FL had a case sensitive filename typo. The directory is named flashtest7Fl (the last 'l' is lower case), while the actual file is flashtest7FL.ino (the last 'L' is upper case). On Linux, the Arduino IDE doesn't like this, so I just put the file in a directory called flashtest7FL

    Of course after seeing this run a few times, I now have Louis Armstrong's It's a Wonderful World running through my head.
    Opps - did a rename, copy, delete, 'check in', rename, 'check in' and now it is :: flashtest7Fl\flashtest7Fl.ino

    Now that you made me look … I see these too for "libraries\extRAM_SPIFFS_t4\extRAM_t4.cpp" :: warning: cannot declare member function 'static ...' to have static linkage

    Also:
    Here is what the internal ram test gives:

    Code:
    SPIFFS filesystem starts at: 0x60010000
    That shows the address as running from Internal PCB T_4.1 "FLASH (rwx): ORIGIN = 0x60000000" again.

  17. #267
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,551
    @MichaelMeissner - @defragster
    Wow - again seems like I cant sleep at night otherwise I miss too much

    First a little history. extRAM_t4 lib was originally developed to emulate the same functionality as the FRAM_I2C library using only the PSRAM chip. Then Frank B put together SPIFFS example that he uploaded in the "test" directory. extRAM_SPIFFS_t4 lib was my attempt to combine the PSRAM lib and the SPIFFS lib into one library. Hope this helps.

    Ok so here goes from the top:
    1. eram_spiffs_partv3.ino: That file needs to be deleted its an old test file and since merged into other stuff.
    2. WARNING: library SPIFFStest claims to run on Teensy architecture(s) and may be incompatible with your current board which runs on avr architecture(s).: Ok have to fix that - that's been there since day one. So have to go look - added a library.properties folder to extRAM lib that should fix this
    3. warning: cannot declare member function 'static s32_t extRAM_t4::spiffs_read(u32_t, u32_t, u8_t*)' to have static linkage [-fpermissive] - ok now that you see this message how can I fix it. Was struggling with this from day one on how to fix it. Note: if I fix it get errors and lib don't run. If I leave as warnings it works. So any help would be appreciated.
    4. Maybe there is another way to get the SPIFFS library @mjs513 ?? - it should be non-zip as a FOLDER in teensy41_extram-master on the top level like the other - just pushed it as SPIFFS_t4 (https://github.com/PaulStoffregen/te...ster/SPIFFS_t4)
    5. spiffstest_internal_flash.ino - yep that's Franks internal flash test. external flash starts at 0x70000000 which the lib is set up for


    Ok - what did I miss on the list.

  18. #268
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,429
    Quote Originally Posted by mjs513 View Post
    @MichaelMeissner - @defragster
    Wow - again seems like I cant sleep at night otherwise I miss too much
    ...
    Ok - what did I miss on the list.
    Morning all...

    Miss - Maybe some sleep

    It will be interesting to see how much of the init stuff can be or should be done automagically as there could easily be many different configurations of usage.

    Like: the default T4.1 with no extra stuff on the bottom, or just external RAM, or just external Flash, or both.

    But there will also be a some who use the bottom pads for their other usages.

    For example I hacked up a first attempt of a castellated solder on board, which hopefully brings these pads out. Ordered set from OSHPark. Will see if my guesstimation of where the two memory chips are on the bottom, when they come back.

    Click image for larger version. 

Name:	t41_cast_pins2.jpg 
Views:	5 
Size:	20.6 KB 
ID:	20011

    Hope this is not too much of a picture here...

  19. #269
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,551
    @PaulStoffregen
    Have a quick question on FLASH and PSRAM. Think there was a post where you said for FLASH you prefer to use it with just SPIFFS and for PSRAM use as extra memory or something like that.

    So the question I have would it be better to have separate libraries for FLASH with SPIFFS and use PSRAM to run something like what put together that mirrors FRAM_MB85_I2C lib? Easy enough to separate I think. Only challenge I had is when I wanted to use both at the same time with the initialization.

  20. #270
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,551
    Quote Originally Posted by KurtE View Post
    Morning all...

    Miss - Maybe some sleep

    It will be interesting to see how much of the init stuff can be or should be done automagically as there could easily be many different configurations of usage.

    Like: the default T4.1 with no extra stuff on the bottom, or just external RAM, or just external Flash, or both.

    But there will also be a some who use the bottom pads for their other usages.

    For example I hacked up a first attempt of a castellated solder on board, which hopefully brings these pads out. Ordered set from OSHPark. Will see if my guesstimation of where the two memory chips are on the bottom, when they come back.
    ….
    Hope this is not too much of a picture here...
    Think initialization is going to be a challenge.

  21. #271
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,429
    Quote Originally Posted by mjs513 View Post
    Think initialization is going to be a challenge.
    Me too!

    Again for extra Flash memory, I still wonder if we can or should be able to configure the 8MB flash that comes with T4.1 to maybe reserve something like 4MB to use as something like SPIFS?
    Again I can see some interesting usage cases for allowing these devices with reasonably large storage to be able to have simple USB FS, where for example maybe for the Robot I am building, I could create new automated moves on my PC, simply plug in the USB port and copy them down to the T4.1 and then have them available...

  22. #272
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,551
    Quote Originally Posted by KurtE View Post
    Me too!

    Again for extra Flash memory, I still wonder if we can or should be able to configure the 8MB flash that comes with T4.1 to maybe reserve something like 4MB to use as something like SPIFS?
    Again I can see some interesting usage cases for allowing these devices with reasonably large storage to be able to have simple USB FS, where for example maybe for the Robot I am building, I could create new automated moves on my PC, simply plug in the USB port and copy them down to the T4.1 and then have them available...
    Actually if you remember I did a quick test where I did created essentially 2 partitions on the ext flash. It was just a matter of configuring the starting address and the size of the of the partition. So theoretically we could do this. Only thing I don't know would be telling the core it only should use say the lower 4MB for normal FLASH usage?

    I would love to see a USB FS set up. Think more interesting is if we could do that with USBHost. I was able to use USBHost with MSC to transfer files from the T4 SPIFFS to the SDCard attached to USBHost port. But would be better if it was set up as a FS.

  23. #273
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,551
    @KurtE
    Just looked at Frank's spitest_flash_internal.ino sketch. This is the part that is of most interest.

    Code:
    extern unsigned long _flashimagelen;
    const unsigned long _startFS = 0x60000000UL + ((unsigned)&_flashimagelen & ~0x3fff) + 0x4000;
    
    void my_spiffs_mount() {
    
      spiffs_config cfg;
    
      cfg.phys_size = 1024 * 1024 * 1; // use 1 MB flash
      cfg.phys_addr = _startFS; // start spiffs here
      cfg.phys_erase_block = 4096;
    which set it up for a SPIFFS start address of 0x60010000 but you know me and memory addressing I like a graphic that kind of shows me the addresses for the FLASH:
    Click image for larger version. 

Name:	teensy4_memory.png 
Views:	6 
Size:	58.1 KB 
ID:	20012
    So is the 0x60010000 start address at the top of the 2MB or ...

  24. #274
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,920
    It takes the imagelen of the currently running program into account and alignes the fs to a
    0x4000 block.

  25. #275
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,551
    Quote Originally Posted by Frank B View Post
    It takes the imagelen of the currently running program into account and alignes the fs to a
    0x4000 block.
    Thanks Frank - didn't know what imagelen really was. So basically the amount of llash left is 8MB - imagelen - 0x4000 that is available for SPIFFS if I understand correctly?

    EDIT: I decided to incorporate your example into one of the example sketches for the RA8876 (had it handy) and it hangs the sketch after it does a SPIFFS mount and I loose USB connection and have to press the button to reprogram:
    Code:
    FLASH:  75024  0.92% of 7936kB (8051440 Bytes free) FLASHMEM, PROGMEM
    ITCM:   60144  0.00% of   64kB (   5392 Bytes free) (RAM1) FASTRUN
    OCRAM:
       524288 Bytes (512 kB)
    -   12384 Bytes (12 kB) DMAMEM
    -     208 Bytes (0 kB) Heap
       511696 Bytes heap free (499 kB), 12592 Bytes OCRAM in use (12 kB).
    DTCM:
       458752 Bytes (448 kB)
    -   17088 Bytes (16 kB) global variables
    -    1316 Bytes (1 kB) max. stack so far
    =========
    
       440348 Bytes free (430 kB), 18404 Bytes in use (17 kB).
    
    
    SPIFFS filesystem starts at: 0x60014000  (hangs here)
    However it does work with the ILI9488 library:
    Code:
    ILI9488_t3n: (T4) SPI automatically selected
    MOSI:11 MISO:12 SCK:13
    
    ILI9488 Test!
    Display Power Mode: 0x0
    MADCTL Mode: 0x0
    Pixel Format: 0x0
    Image Format: 0x0
    Self Diagnostic: 0x0
    
    SPIFFS filesystem starts at: 0x60018000
    
    15cddfb5, 60018000
    mount res: 0
    --> Test Start ...
    --> Hello World! What a wonderful World :) <--
    --> ... Test Middle ... 
    --> --> xxxxxx <--
    --> ... Test Middle ... 
    --> --> Hello World! What a wonderful World :) <--
    --> ... Test Middle ... 
    --> Hello World! What a wonderful World :) <--
    --> ... Test End.
    
    Benchmark                Time (microseconds)
    Screen fill              615267
    Text                     12102
    Lines                    154633
    Horiz/Vert Lines         51431
    Rectangles (outline)     28579
    Rectangles (filled)      1486933
    Circles (filled)         181859
    Circles (outline)        124489
    Triangles (outline)      33610
    Triangles (filled)       491796
    Rounded rects (outline)  55285
    Rounded rects (filled)   1626556
    Done!
    Last edited by mjs513; 05-07-2020 at 02:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •