Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.0.3 to fix bug
Browse files Browse the repository at this point in the history
### Releases v1.0.3

1. Fix crashing issue for new flash. Check [RP2040_RTC_Time crashes Pico, does not work #3](khoih-prog/RP2040_RTC#3)
  • Loading branch information
khoih-prog committed Nov 2, 2021
1 parent ba83857 commit 9b72779
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 88 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.15) or Platform.io version
* `Arduino mbed_rp2040` Core Version (e.g. Arduino mbed_rp2040 core v2.4.1)
* Arduino IDE version (e.g. 1.8.16) or Platform.io version
* `Arduino mbed_rp2040` Core Version (e.g. Arduino mbed_rp2040 core v2.5.2)
* `RP2040` Board type (e.g. Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc.)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
Expand All @@ -27,11 +27,11 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.15
Arduino mbed_rp2040 core v2.4.1
Arduino IDE version: 1.8.16
Arduino mbed_rp2040 core v2.5.2
RASPBERRY_PI_PICO board
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered a crash while using TimerInterrupt.
Expand Down
63 changes: 16 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
* [Why do we need this LittleFS_Mbed_RP2040 library](#why-do-we-need-this-littlefs_mbed_rp2040-library)
* [Features](#features)
* [Currently supported Boards](#currently-supported-boards)
* [Changelog](#changelog)
* [Releases v1.0.2](#releases-v102)
* [Releases v1.0.1](#releases-v101)
* [Initial Releases v1.0.0](#initial-releases-v100)
* [Changelog](changelog.md)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Use Arduino Library Manager](#use-arduino-library-manager)
Expand All @@ -34,7 +31,6 @@
* [2. LittleFS_Test on RaspberryPi Pico](#2-littlefs_test-on-raspberrypi-pico)
* [Debug](#debug)
* [Troubleshooting](#troubleshooting)
* [Releases](#releases)
* [Issues](#issues)
* [TO DO](#to-do)
* [DONE](#done)
Expand Down Expand Up @@ -74,30 +70,12 @@ The filesystem access uses normal [POSIX APIs](https://www.tutorialspoint.com/c_
---
---

## Changelog

### Releases v1.0.2

1. Add mbed, mbed_nano and ArduinoCore-mbed to architectures of `library.properties`

### Releases v1.0.1

1. Fix FORCE_REFORMAT bug in example
2. Change default RP2040_FS_SIZE_KB from 256KB to 64KB to avoid crash in some new boards. Check [MBED crash - RP2040 rebooting #1](https://github.com/khoih-prog/LittleFS_Mbed_RP2040/issues/1)

### Initial Releases v1.0.0

1. Initial coding to support RP2040-based boards such as **Nano_RP2040_Connect, RASPBERRY_PI_PICO**, etc. using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)


---
---

## Prerequisites

1. [`Arduino IDE 1.8.15+` for Arduino](https://www.arduino.cc/en/Main/Software)
1. [`Arduino IDE 1.8.16+` for Arduino](https://www.arduino.cc/en/Main/Software)
2. [`Arduino mbed_rp2040 core 2.3.1-`](https://github.com/arduino/ArduinoCore-mbed) for RP2040-based boards using `ISSI` Flash chip, see [New board](pics/New_Board.png), such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
3. [`Arduino mbed_rp2040 core 2.4.1`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards using `Adesto` Flash chip, see [Old board](pics/Old_Board.png),, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
3. [`Arduino mbed_rp2040 core 2.4.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards using `Adesto` Flash chip, see [Old board](pics/Old_Board.png), such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)

---
---
Expand Down Expand Up @@ -500,23 +478,23 @@ The following is the sample terminal output when running example [LittleFS_Count

```
Start LittleFS_Counting on RaspberryPi Pico
LittleFS_Mbed_RP2040 v1.0.2
LittleFS_Mbed_RP2040 v1.0.3
[LFS] LittleFS size (KB) = 256
[LFS] LittleFS Mount OK
Deleting file: /littlefs/counts.txt => OK
Times have been run = 1
=> Open to write OK
Start LittleFS_Counting on RaspberryPi Pico
LittleFS_Mbed_RP2040 v1.0.2
LittleFS_Mbed_RP2040 v1.0.3
[LFS] LittleFS size (KB) = 256
[LFS] LittleFS Mount OK
=> Open to read OK
Times have been run = 2
=> Open to write OK
Start LittleFS_Counting on RaspberryPi Pico
LittleFS_Mbed_RP2040 v1.0.2
LittleFS_Mbed_RP2040 v1.0.3
[LFS] LittleFS size (KB) = 256
[LFS] LittleFS Mount OK
=> Open to read OK
Expand All @@ -531,7 +509,7 @@ The following is the sample terminal output when running example [LittleFS_Test]

```
Start LittleFS_Test on RaspberryPi Pico
LittleFS_Mbed_RP2040 v1.0.2
LittleFS_Mbed_RP2040 v1.0.3
[LFS] LittleFS size (KB) = 256
[LFS] LittleFS Mount OK
====================================================
Expand Down Expand Up @@ -611,24 +589,6 @@ If you get compilation errors, more often than not, you may need to install a ne
Sometimes, the library will only work if you update the board core to the latest version because I am using newly added functions.


---
---

## Releases

### Releases v1.0.2

1. Add mbed, mbed_nano and ArduinoCore-mbed to architectures of `library.properties`

### Releases v1.0.1

1. Fix FORCE_REFORMAT bug in example
2. Change default RP2040_FS_SIZE_KB from 256KB to 64KB to avoid crash in some new boards. Check [MBED crash - RP2040 rebooting #1](https://github.com/khoih-prog/LittleFS_Mbed_RP2040/issues/1)

### Initial Releases v1.0.0

1. Initial coding to support RP2040-based boards such as **Nano_RP2040_Connect, RASPBERRY_PI_PICO**, etc. using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)

---
---

Expand Down Expand Up @@ -658,6 +618,15 @@ Submit issues to: [LittleFS_Mbed_RP2040 issues](https://github.com/khoih-prog/Li

Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.

1. Thanks to [Maximilian Gerhardt](https://github.com/maxgerhardt) to create bug report [RP2040_RTC_Time crashes Pico, does not work #3](https://github.com/khoih-prog/RP2040_RTC/issues/3) and help investigate and fix the bug, leading to v1.0.3

<table>
<tr>
<td align="center"><a href="https://github.com/maxgerhardt"><img src="https://github.com/maxgerhardt.png" width="100px;" alt="maxgerhardt"/><br /><sub><b>Maximilian Gerhardt</b></sub></a><br /></td>
</tr>
</table>



---

Expand Down
39 changes: 39 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# LittleFS_Mbed_RP2040 Library

[![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_Mbed_RP2040.svg?)](https://www.ardu-badge.com/LittleFS_Mbed_RP2040)
[![GitHub release](https://img.shields.io/github/release/khoih-prog/LittleFS_Mbed_RP2040.svg)](https://github.com/khoih-prog/LittleFS_Mbed_RP2040/releases)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/LittleFS_Mbed_RP2040/blob/main/LICENSE)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/LittleFS_Mbed_RP2040.svg)](http://github.com/khoih-prog/LittleFS_Mbed_RP2040/issues)

---
---

## Table of Contents

* [Changelog](#changelog)
* [Releases v1.0.3](#releases-v103)
* [Releases v1.0.2](#releases-v102)
* [Releases v1.0.1](#releases-v101)
* [Initial Releases v1.0.0](#initial-releases-v100)

---
---

## Changelog

### Releases v1.0.3

1. Fix crashing issue for new flash. Check [RP2040_RTC_Time crashes Pico, does not work #3](https://github.com/khoih-prog/RP2040_RTC/issues/3)

### Releases v1.0.1

1. Fix FORCE_REFORMAT bug in example
2. Change default RP2040_FS_SIZE_KB from 256KB to 64KB to avoid crash in some new boards. Check [MBED crash - RP2040 rebooting #1](https://github.com/khoih-prog/LittleFS_Mbed_RP2040/issues/1)

### Initial Releases v1.0.0

1. Initial coding to support RP2040-based boards such as **Nano_RP2040_Connect, RASPBERRY_PI_PICO**, etc. using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)



8 changes: 0 additions & 8 deletions examples/LittleFS_Counting/LittleFS_Counting.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
*****************************************************************************************************************************/

#define _LFS_LOGLEVEL_ 1
Expand Down
8 changes: 0 additions & 8 deletions examples/LittleFS_Test/LittleFS_Test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
*****************************************************************************************************************************/

#define _LFS_LOGLEVEL_ 1
Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LittleFS_Mbed_RP2040",
"version": "1.0.2",
"version": "1.0.3",
"keywords": "storage, data-storage, littlefs, littlefs-mbed, flash, flash-storage, posix, file-system, file, mbed, mbed-rp2040, nano-rp2040-connect, raspberry-pico, rpi-pico, pico, rp2040",
"description": "This library facilitates your usage of LittleFS for the onboard flash. LittleFS supports power fail safety and high performance",
"authors":
Expand All @@ -23,7 +23,7 @@
]
},
"frameworks": "*",
"platforms": "mbed_rp2040",
"platforms": ["raspberrypi"],
"examples": "examples/*/*/*.ino",
"license": "GPL-3.0-or-later"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=LittleFS_Mbed_RP2040
version=1.0.2
version=1.0.3
author=Khoi Hoang <khoih.prog@gmail.com>
maintainer=Khoi Hoang <khoih.prog@gmail.com>
sentence=Wrapper of LittleFS for Arduino MBED RP2040 boards
Expand Down
5 changes: 3 additions & 2 deletions src/LittleFS_Mbed_RP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version: 1.0.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
1.0.3 K Hoang 02/11/2021 Fix crashing issue for new flash
*****************************************************************************************************************************/

#ifndef _LITTLEFS_MBED_RP2040_H
Expand All @@ -26,7 +27,7 @@
#endif

#ifndef LFS_MBED_RP2040_VERSION
#define LFS_MBED_RP2040_VERSION "LittleFS_Mbed_RP2040 v1.0.2"
#define LFS_MBED_RP2040_VERSION "LittleFS_Mbed_RP2040 v1.0.3"
#endif

#ifndef LFS_MBED_RP2040_DEBUG
Expand Down
4 changes: 2 additions & 2 deletions src/LittleFS_Mbed_RP2040.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version: 1.0.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
1.0.3 K Hoang 02/11/2021 Fix crashing issue for new flash
*****************************************************************************************************************************/

#ifndef _LITTLEFS_MBED_RP2040_HPP
Expand Down Expand Up @@ -42,7 +43,6 @@ bool LittleFS_MBED::mount()
{
// Reformat if we can't mount the filesystem
LFS_LOGERROR("Formatting... ");
LFS_FLUSH();

err = fs.reformat(&bd);
}
Expand Down
5 changes: 3 additions & 2 deletions src/LittleFS_Mbed_RP2040_Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version: 1.0.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
1.0.3 K Hoang 02/11/2021 Fix crashing issue for new flash
*****************************************************************************************************************************/

#ifndef LittleFS_Mbed_RP2040_Debug_h
Expand Down Expand Up @@ -44,7 +45,7 @@ const char LFS_MARK[] = "[LFS] ";

#define LFS_PRINT DBG_PORT_LFS.print
#define LFS_PRINTLN DBG_PORT_LFS.println
#define LFS_FLUSH DBG_PORT_LFS.flush


//////////////////////////////////////////

Expand Down
3 changes: 2 additions & 1 deletion src_cpp/LittleFS_Mbed_RP2040.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version: 1.0.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
1.0.3 K Hoang 02/11/2021 Fix crashing issue for new flash
*****************************************************************************************************************************/

#include "LittleFS_Mbed_RP2040.h"
Expand Down
5 changes: 3 additions & 2 deletions src_cpp/LittleFS_Mbed_RP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version: 1.0.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
1.0.3 K Hoang 02/11/2021 Fix crashing issue for new flash
*****************************************************************************************************************************/

#ifndef _LITTLEFS_MBED_RP2040_H
Expand All @@ -26,7 +27,7 @@
#endif

#ifndef LFS_MBED_RP2040_VERSION
#define LFS_MBED_RP2040_VERSION "LittleFS_Mbed_RP2040 v1.0.2"
#define LFS_MBED_RP2040_VERSION "LittleFS_Mbed_RP2040 v1.0.3"
#endif

#ifndef LFS_MBED_RP2040_DEBUG
Expand Down
5 changes: 3 additions & 2 deletions src_cpp/LittleFS_Mbed_RP2040_Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
Built by Khoi Hoang https://github.com/khoih-prog/LittleFS_Mbed_RP2040
Licensed under MIT license
Version: 1.0.2
Version: 1.0.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 11/06/2021 Initial coding to support MBED RP2040-based boards such as RASPBERRY_PI_PICO. etc.
1.0.1 K Hoang 16/08/2021 Fix FORCE_REFORMAT bug in example
1.0.2 K Hoang 07/09/2021 Add mbed and ArduinoCore-mbed to architectures
1.0.3 K Hoang 02/11/2021 Fix crashing issue for new flash
*****************************************************************************************************************************/

#ifndef LittleFS_Mbed_RP2040_Debug_h
Expand Down Expand Up @@ -44,7 +45,7 @@ const char LFS_MARK[] = "[LFS] ";

#define LFS_PRINT DBG_PORT_LFS.print
#define LFS_PRINTLN DBG_PORT_LFS.println
#define LFS_FLUSH DBG_PORT_LFS.flush


//////////////////////////////////////////

Expand Down
Loading

0 comments on commit 9b72779

Please sign in to comment.