Skip to content

Commit

Permalink
fix build without lfs
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Sep 28, 2023
1 parent 9c1ecec commit 841aade
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions openBeken_win32_mvsc2017.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Win32|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Win322|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="src\littlefs\our_lfs.h" />
<ClInclude Include="src\selftest\selftest_local.h" />
<ClInclude Include="src\sim\Bounds.h" />
<ClInclude Include="src\sim\Circle.h" />
Expand Down
3 changes: 3 additions & 0 deletions openBeken_win32_mvsc2017.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,9 @@
<ClInclude Include="src\driver\drv_ht16k33.h">
<Filter>Drv</Filter>
</ClInclude>
<ClInclude Include="src\littlefs\our_lfs.h">
<Filter>LFS</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\platforms\bk7231t\bk7231t_os\beken378\func\include\net_param_pub.h" />
Expand Down
3 changes: 2 additions & 1 deletion src/littlefs/our_lfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "../obk_config.h"
#include "lfs.h"

#if ENABLE_LITTLEFS
// we need that even if LFS is disabled

#if PLATFORM_BK7231T
// start 0x1000 after OTA addr
Expand All @@ -34,6 +34,7 @@
#define LFS_BLOCKS_END 0x1AB000
#endif

#if ENABLE_LITTLEFS

// 512k MAX - i.e. no more that 0x80000
// 0x8000 = 32k
Expand Down
1 change: 1 addition & 0 deletions src/obk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#define ENABLE_DRIVER_CHARGINGLIMIT 1
#define ENABLE_DRIVER_BATTERY 1


#elif PLATFORM_BL602

// I have enabled drivers on BL602
Expand Down
3 changes: 3 additions & 0 deletions src/win_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <ws2tcpip.h>
#include <stdlib.h>
#include <stdio.h>
#include "obk_config.h"
#include "new_common.h"
#include "driver\drv_public.h"
#include "cmnds\cmd_public.h"
Expand Down Expand Up @@ -111,7 +112,9 @@ void SIM_Hack_ClearSimulatedPinRoles();
void SIM_ClearOBK(const char *flashPath) {
if (bObkStarted) {
DRV_ShutdownAllDrivers();
#if ENABLE_LITTLEFS
release_lfs();
#endif
SIM_Hack_ClearSimulatedPinRoles();
WIN_ResetMQTT();
UART_ResetForSimulator();
Expand Down

0 comments on commit 841aade

Please sign in to comment.