diff --git a/README.md b/README.md
index b6fa64e9..cd350386 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,7 @@
11. [Q7S OBC](#q7s)
12. [Static Code Analysis](#static-code-analysis)
13. [Eclipse](#eclipse)
+14. [CLion](#clion)
14. [Running the OBSW on a Raspberry Pi](#rpi)
15. [Running OBSW on EGSE](#egse)
16. [Manually preparing sysroots to compile gpsd](#gpsd)
@@ -1229,6 +1230,22 @@ Finally, you can convert the generated `.xml` file to HTML with the following co
cppcheck-htmlreport --file=report.xml --report-dir=cppcheck --source-dir=..
```
+# CLion
+
+CLion is the recommended IDE for the development of the hosted version of EIVE.
+You can also set up CLion for cross-compilation of the primary OBSW.
+
+There is a shared `.idea/cmake.xml` file to get started with this.
+To make cross-compilation work, two special environment variables
+need to be set:
+
+- `ZYNQ_7020_ROOTFS` pointing to the root filesystem
+- `CROSS_COMPILE` pointing to the the full path of the cross-compiler
+ without the specific tool suffix. For example, if the the cross-compiler
+ tools are located at `/opt/q7s-gcc/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin`,
+ this variable would be set
+ to `/opt/q7s-gcc/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf`
+
# Eclipse
When using Eclipse, there are two special build variables in the project properties
diff --git a/mission/tmtc/PersistentTmStore.cpp b/mission/tmtc/PersistentTmStore.cpp
index 92cff08d..bb64850c 100644
--- a/mission/tmtc/PersistentTmStore.cpp
+++ b/mission/tmtc/PersistentTmStore.cpp
@@ -261,8 +261,7 @@ void TmStore::fileToPackets(const std::filesystem::path& path, uint32_t unixStam
// CRC check to fully ensure this is a valid TM
ReturnValue_t result = reader.parseDataWithCrcCheck();
if (result == returnvalue::OK) {
- ReturnValue_t result =
- tmStore.addData(&storeId, fileBuf.data() + currentIdx, reader.getFullPacketLen());
+ result = tmStore.addData(&storeId, fileBuf.data() + currentIdx, reader.getFullPacketLen());
if (result != returnvalue::OK) {
continue;
}