Mtd_mapper problem

Hi,

I am trying to rework the fs sample using a mtd_mapper. However the code is failing on: mtd_mapper_parent_t parent = MTD_PARENT_INIT(MTD_0);

with

error: initializer element is not constant,

what am I doing wrong ?

Thanks,

I can’t expand this into a full example right now (it’d generally be easier if a question like this came with full code, possibly through a link to your project or a pastebin), but the other MTD thread sounds like you got past this issue – how did you resolve it?

I tried to do this declaration outside of the main loop and this doesn’t work. By putting it inside the main loop the problem is resolved.