piconomix / px-fwlib

open source bare-metal C firmware and documentation for microcontrollers
Other
281 stars 27 forks source link

Can pix_log be used with configuration file ? #3

Closed ranshalit closed 4 years ago

ranshalit commented 4 years ago

Hello,

I have some trouble finding appropriate filesystem with my NOR flash with embedded stm32 device. The external flash has a large erase sectors flash (128K).

I thought about various options (I have large RAM), but not yet sure what is best. I found this great filesystem, but I think we also have configuration file. Can it be used with configuration file ? If not, do you have any suggestion for this problem ?

Thank you very much! Ran

pieterconradie commented 4 years ago

Hi Ran!

I am not sure what you mean with "configuration file". What is the part number of your external NOR flash chip? px_log_fs.c requires you to configure it with a px_log_fs_cfg.h configuration file. In it you can set the page size with PX_LOG_FS_CFG_PAGE_SIZE and the erase block size with PX_LOG_FS_CFG_ERASE_BLOCK_SIZE. You also need to provide the functions to read from a page, write to a page and erase a block. See px_log_fs_glue.h, for example px_log_fs_glue_at25s.c.

Hope that helps! Pieter