flashdisk and partition_manager build fail

Hi,Nodic!

We  are now using nrf5340, ncs2.5.0 to do the project.

We are using disk mass storage with a filesystem mounted on an external memory device.Now I see that this should be fixed but I'm completely lost and can't get this to work at all.

Here is the errors I get

I

n file included from D:/nus_2.5.0/v2.5.0/zephyr/drivers/disk/flashdisk.c:14:
D:/nus_2.5.0/v2.5.0/zephyr/drivers/disk/flashdisk.c:563:10: error: 'disk_flash_init' undeclared (first use in this function)
  563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
      |          ^~~~~~~~~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/include/zephyr/init.h:193:45: note: in definition of macro 'SYS_INIT_NAMED'
  193 |                         .init_fn = {.sys = (init_fn_)},                        \
      |                                             ^~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
  563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
      | ^~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/drivers/disk/flashdisk.c:484:1: error: type of 'DEFINE_FLASHDISKS_CACHE' defaults to 'int' [-Werror=implicit-int]
  484 | PM_FOREACH_AFFILIATED_TO_disk(DEFINE_FLASHDISKS_CACHE)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/include/zephyr/init.h:125:44: error: declaration for parameter '__init_disk_flash_init' but no such parameter
  125 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
      |                                            ^~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
D:/nus_2.5.0/v2.5.0/zephyr/include/zephyr/init.h:125:36: note: in expansion of macro '_CONCAT'
  125 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
      |                                    ^~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/include/zephyr/init.h:192:17: note: in expansion of macro 'Z_INIT_ENTRY_NAME'
  192 |                 Z_INIT_ENTRY_NAME(name) = {                                    \
      |                 ^~~~~~~~~~~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/include/zephyr/init.h:174:9: note: in expansion of macro 'SYS_INIT_NAMED'
  174 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
      |         ^~~~~~~~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
  563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
      | ^~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/drivers/disk/flashdisk.c:523:30: error: declaration for parameter 'flash_disks' but no such parameter
  523 | static struct flashdisk_data flash_disks[] = {
      |                              ^~~~~~~~~~~
D:/nus_2.5.0/v2.5.0/zephyr/drivers/disk/flashdisk.c:565: error: expected '{' at end of input

My pm_static.yml

external_flash:
  address: 0x0
  end_address: 0x800000
  region: external_flash
  size: 0x800000

storage_partition:
  affiliation: disk
  address: 0
  end_address: 0x800000
  extra_params:
    disk_cache_size: 0x1000
    disk_name: NAND
    disk_read_only: 0x0
    disk_sector_size: 0x200
  placement:
    align:
      start: 0x1000
    before:
    - end
  region: external_flash
  size: 0x800000

My device-tree

My prj.conf

I also tried a partition format like this, but it also failed to compile.

Hoping to hear back from you soon.

Related