Skip to content

Commit 4e5f5db

Browse files
committed
Finish V2.2.0
2 parents c9b4e4e + 6c54270 commit 4e5f5db

16 files changed

Lines changed: 435 additions & 144 deletions

CHANGE_LOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project/module will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project/module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
---
8+
## V2.2.0 - 08.05.2025
9+
10+
### Added
11+
- Added support for writting/reading from arbitrary RAM location
12+
- Added support to retrieve device uptime
13+
- Added "utils" dependency
14+
- Added timeout functionality for received commands
15+
16+
### Fixed
17+
- Fixed compiler warnings (implicit conversions)
18+
719
---
820
## V2.1.0 - 21.01.2025
921

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ NVM module must take following path:
163163
"root/middleware/nvm/nvm/src/nvm.h"
164164
```
165165

166+
### **3. Utils Module**
167+
Utils module must take following path:
168+
```
169+
"root/common/utils/src/utils.h"
170+
```
171+
166172
## **Limitations**
167173

168174
### **1. ASCII Base Interface**
@@ -202,9 +208,11 @@ root/middleware/cli/cli/"module_space"
202208
| **CLI_CFG_INTRO_SW_VER** | Software version. Part of intro string. |
203209
| **CLI_CFG_INTRO_HW_VER** | Hardware version. Part of intro string. |
204210
| **CLI_CFG_INTRO_PROJ_INFO** | Project detailed info. Part of "revision" module. |
211+
| **CLI_CFG_ARBITRARY_RAM_ACCESS_EN** | Enable/Disable arbitrary RAM access functionality |
205212
| **CLI_CFG_TERMINATION_STRING** | String that will be send after each "cli_printf" and "cli_printf_ch". |
206213
| **CLI_CFG_TX_BUF_SIZE** | Transmitting buffer size in bytes. |
207214
| **CLI_CFG_RX_BUF_SIZE** | Reception buffer size in bytes. |
215+
| **CLI_GET_SYSTICK** | Get system timetick in 32-bit unsigned integer form. |
208216
| **CLI_CFG_MAX_NUM_OF_USER_TABLES** | Maximum number of user define command tables. |
209217
| **CLI_CFG_MUTEX_EN** | Enable/Disable usage of mutex in order to protect low level communication driver. |
210218
| **CLI_CFG_PAR_USE_EN** | Enable/Disable usage of Device Parameters. |
@@ -547,3 +555,47 @@ osci_data\r\n // Get data
547555
Example of software oscilloscope usage in real life case, sample frequency was 8kHz with falling edge trigger:
548556

549557
![](doc/usage_example.png)
558+
559+
560+
### **Direct RAM access**
561+
When *CLI_CFG_ARBITRARY_RAM_ACCESS_EN* is enabled then make sure to provide *cli_if_check_ram_addr_range* interface function so that valid RAM address can be accesed by the user over the CLI.
562+
563+
Enable given switch in *cli_cfg.h*:
564+
```C
565+
/**
566+
* Enable/Disable arbitrary RAM access functionality
567+
*/
568+
#define CLI_CFG_ARBITRARY_RAM_ACCESS_EN ( 1 )
569+
```
570+
571+
Provide RAM valid address for access checking in *cli_if.c*:
572+
```C
573+
////////////////////////////////////////////////////////////////////////////////
574+
/**
575+
* Check if specified RAM address range is valid and can be accessed
576+
*
577+
* @param[in] addr - RAM address
578+
* @param[in] size - Range size [byte]
579+
* @return status - Status of operation
580+
*/
581+
////////////////////////////////////////////////////////////////////////////////
582+
cli_status_t cli_if_check_ram_addr_range(const uint32_t addr, const uint32_t size)
583+
{
584+
// NOTICE: Following example is for nRF52840 chipset using Segger Embedded Studio IDE!
585+
586+
// Linker symbols specifying entire RAM range, including SoftDevice reserved region
587+
extern uint32_t __RAM1_segment_start__[];
588+
extern uint32_t __RAM1_segment_end__[];
589+
590+
cli_status_t status = eCLI_OK;
591+
592+
// Start address is inclusive and end address is exclusive.
593+
// Additionally check for range overflow.
594+
if ((addr < (uint32_t)__RAM1_segment_start__) || ((addr + size) > (uint32_t)__RAM1_segment_end__) || ((addr + size) < addr))
595+
{
596+
status = eCLI_ERROR;
597+
}
598+
599+
return status;
600+
}
601+
```

0 commit comments

Comments
 (0)