henrykotze commented on issue #17809:
URL: https://github.com/apache/nuttx/issues/17809#issuecomment-3743612000

   Thanks for the pointers! I made some good progress. The ESP32 is booting up. 
😄  
   Im having issue reading and storing parameters to a section of memory.
   
   this is the boot up sequence:
   ```
   rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
   configsip: 0, SPIWP:0xee
   clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
   mode:DIO, clock div:2
   load:0x3fff0030,len:6952
   load:0x40078000,len:15488
   load:0x40080400,len:4
   ho 8 tail 4 room 4
   load:0x40080404,len:3752
   entry 0x40080648
   I (179) boot: ESP-IDF v5.1-dev-3972-g1559b6309f 2nd stage bootloader
   I (179) boot: compile time Mar 15 2023 12:14:05
   I (182) boot: chip revision: v3.1
   I (186) boot.esp32: SPI Speed      : 40MHz
   I (190) boot.esp32: SPI Mode       : DIO
   I (195) boot.esp32: SPI Flash Size : 4MB
   I (200) boot: Enabling RNG early entropy source...
   I (205) boot: Partition Table:
   I (209) boot: ## Label            Usage          Type ST Offset   Length
   I (216) boot:  0 factory          factory app      00 00 00010000 00200000
   I (224) boot: End of partition table
   I (228) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1c9a0h 
(117152) map
   I (279) esp_image: segment 1: paddr=0002c9c8 vaddr=3ffb5f20 size=00e24h (  
3620) load
   I (281) esp_image: segment 2: paddr=0002d7f4 vaddr=40080000 size=02824h ( 
10276) load
   I (289) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=742e4h 
(475876) map
   I (465) esp_image: segment 4: paddr=000a430c vaddr=40082824 size=002e4h (   
740) load
   I (467) boot: Loaded app from partition at offset 0x10000
   I (468) boot: Disabling RNG early entropy source...
   ```
   Im creating a partition to store the parameters and access it via the mtd 
driver:
   ```
   #define CONFIG_ESP32_PARAM_MTD_OFFSET   0x330000
   #define CONFIG_ESP32_PARAM_MTD_SIZE     0x10000
   
   static int init_param_partition(void)
   {
        int ret = OK;
        struct mtd_dev_s *mtd;
   
        mtd = esp_spiflash_alloc_mtdpart(CONFIG_ESP32_PARAM_MTD_OFFSET,
                                           CONFIG_ESP32_PARAM_MTD_SIZE);
   
        if (!mtd) {
                ferr("ERROR: Failed to alloc PARAM MTD partition of SPI 
Flash\n");
                return -ENOMEM;
        }
   
        ret = register_mtddriver("/fs/mtd_params", mtd, 0755, NULL);
   
        if (ret < 0) {
                ferr("ERROR: Failed to register PARAM MTD: %d\n", ret);
                return ret;
        }
   
        return ret;
   }
   ```
   
   you will see this partition is not defined in the partition table.
   Is this an issue? For some reason, with PX4 on Nuttx 10.3, this is working, 
but not on Nuttx 12.12


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to