flash-memory

Reason for ubi filesystem corruption

こ雲淡風輕ζ 提交于 2021-01-27 23:31:59
问题 I have used ubi filesystem and mtd subsystem to work on the top of NAND flash. It was working fine. But now I'm finding the following errors: UBI error: ubi_io_read: error -74 while reading 516096 bytes from PEB 2701:8192, read 516096 bytes end_request: I/O error, dev mtdblock5, sector 49160 what is the reason for those errors which I have mentioned above? How to recover from these error? 回答1: Both shows I/O errors which is related to corruption or bad block on your NAND Flash, try using

Keep rodata located with the function that created it

岁酱吖の 提交于 2021-01-27 13:27:50
问题 I'm trying to make .rodata section location stay with its associated function memory location. I'm using the GNU compiler/linker, bare metal, plain-jane c, with an STM32L4A6 micro-controller. I have a custom board using an STM32L4A6 controller with 1Meg of Flash divided into 512 - 2K pages. Each page can be individually erased and programmed from a function running in RAM. I'd like to take advantage of this fine-grained flash organization to create an embedded firmware application that can be

Executing programs stored in external SPI flash memory on an ARM processor

做~自己de王妃 提交于 2020-05-24 21:03:13
问题 I have an ARM processor that is able to interface with an external flash memory chip. Written to the chip are programs compiled for the ARM architecture ready to be executed. What I need to know how to do is get this data from the external flash onto the ARM processor for execution. Can I run some sort of copy routine ahead-of-time where the data is copied into executable memory space? I suppose I could, but the ARM processor is running an operating system and I don't have a ton of space left

Executing programs stored in external SPI flash memory on an ARM processor

回眸只為那壹抹淺笑 提交于 2020-05-24 20:59:09
问题 I have an ARM processor that is able to interface with an external flash memory chip. Written to the chip are programs compiled for the ARM architecture ready to be executed. What I need to know how to do is get this data from the external flash onto the ARM processor for execution. Can I run some sort of copy routine ahead-of-time where the data is copied into executable memory space? I suppose I could, but the ARM processor is running an operating system and I don't have a ton of space left

What is a good filesystem for embedded NAND drives?

岁酱吖の 提交于 2020-01-02 01:05:32
问题 I am working on an embedded application that uses NAND flash for storage. As it looks now, we won't use Linux or any other RTOS. The application must handle unexpected power downs. We have been looking on different file system solutions, including YAFFS2, JFFS2, FAT+FTL as well as solutions from HCC Embedded. I have heard FAT+FTL is a normal choice, but I am worried about data loss in case of unexpected power downs as well as performance. Would be grateful if anyone could share insights and

STM32F4 Discovery - Writing / Reading Flash memory

二次信任 提交于 2019-12-31 04:51:09
问题 This is my first post here, sorry if format or something is wrong. I succeed writing and reading flash memory of the STM32F4 Discovery following the advises of our colleges here and here (both posts explain the same way): __attribute__((__section__(".user_data"))) const char userConfig[64]; [...] void Write_Flash(uint8_t data) { HAL_FLASH_Unlock(); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR ); FLASH_Erase_Sector(FLASH

Writing in STM32L4x1 flash memory in C

好久不见. 提交于 2019-12-25 05:20:42
问题 I am trying to write in STM32L476's flash memory using a JTAG ST-Link/V2 on Windows 7. No software has to be uploaded, I only need to write data in a non-volatile place where it can be read and deleted. As a newbie regarding hardware and being efficient only when programming non-embedded regular C, I am afraid I might harm or modify irrevocably the flash memory. Also, I am not really sure regarding what I can or cannot do. I have figured out reading the manual that writing in 0x08000000

Access NOR memory from userspace

强颜欢笑 提交于 2019-12-24 07:17:34
问题 On my Compulab cm-x270 CoM Linux kernel placed in NOR. This kernel without MTD support, and after boot I can't access to NOR as MTD partition. My goal is update this kernel from userspace. Yes, update from bootloader by tftp most easier way, but I can't use it in this task. It is possible mapping NOR in /dev/mem or any another way? 回答1: I had a similar situation with SRAM. I wrote a block device driver for /dev/sram . Access through a device driver preserves all of the Linux security rules.