diff --git a/source/FSCache.cpp b/source/FSCache.cpp index e0e8fc64..d5352a93 100644 --- a/source/FSCache.cpp +++ b/source/FSCache.cpp @@ -84,7 +84,7 @@ int FSCache::read(uint32_t address, const void *data, int len) int bytesCopied = 0; // Ensure that the operation is within the limits of the device - if (address < flash.getFlashStart() || address + len >= flash.getFlashEnd()) + if (address < flash.getFlashStart() || address + len > flash.getFlashEnd()) return DEVICE_INVALID_PARAMETER; // Read operation may span multiple cache boundaries... so we iterate over blocks as necessary. @@ -116,7 +116,7 @@ int FSCache::write(uint32_t address, const void *data, int len) int bytesCopied = 0; // Ensure that the operation is within the limits of the device - if (address < flash.getFlashStart() || address + len >= flash.getFlashEnd()) + if (address < flash.getFlashStart() || address + len > flash.getFlashEnd()) return DEVICE_INVALID_PARAMETER; #ifdef CODAL_FS_CACHE_VALIDATE diff --git a/target-locked.json b/target-locked.json index 5451806f..04e9a8b5 100644 --- a/target-locked.json +++ b/target-locked.json @@ -11,6 +11,7 @@ "CODAL_PROVIDE_PRINTF": 1, "CODAL_TIMER_32BIT": 1, "CODAL_TIMESTAMP": "uint64_t", + "CODAL_VERSION": "\"unknown\"", "CONFIG_GPIO_AS_PINRESET": 1, "CONFIG_NFCT_PINS_AS_GPIOS": 1, "DEVICE_BLE": 1, @@ -71,6 +72,6 @@ "linker_flags": "-Wl,--no-wchar-size-warning -Wl,--gc-sections -Wl,--wrap,atexit -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group", "post_process": "", "processor": "NRF52833", - "snapshot_version": "v0.2.67", + "snapshot_version": "v0.2.68", "toolchain": "ARM_GCC" } \ No newline at end of file diff --git a/target.json b/target.json index f2c0dbe3..6ca15967 100644 --- a/target.json +++ b/target.json @@ -7,7 +7,6 @@ "generate_bin":true, "generate_hex":true, "config":{ - "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC": "NRF_LF_SRC_XTAL", "CONFIG_GPIO_AS_PINRESET": 1, "CONFIG_NFCT_PINS_AS_GPIOS": 1, @@ -42,7 +41,8 @@ "CAPTOUCH_DEFAULT_CALIBRATION" : 3500, "HARDWARE_NEOPIXEL": 1, "CODAL_TIMER_32BIT": 1, - "DEVICE_BLE": 1 + "DEVICE_BLE": 1, + "CODAL_VERSION": "\"unknown\"" }, "definitions":"-DAPP_TIMER_V2 -DAPP_TIMER_V2_RTC1_ENABLED -DNRF_DFU_TRANSPORT_BLE=1 -DNRF52833_XXAA -DNRF52833 -DTARGET_MCU_NRF52833 -DNRF5 -DNRF52833 -D__CORTEX_M4 -DS113 -DTOOLCHAIN_GCC -D__START=target_start",