Skip to content

Commit

Permalink
[kernel] minor tweak to __vsf_heap_init
Browse files Browse the repository at this point in the history
  • Loading branch information
versaloon committed Jul 27, 2023
1 parent 45a5184 commit 0e7dacc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/template/project/vc/vsf_template_win.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>__VSF__;__CPU_X86__;__WIN__;__OOC_CPP__;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LV_CONF_INCLUDE_SIMPLE;HAS_STD_MALLOC;HAS_AWTK_CONFIG;FT2_BUILD_LIBRARY;PREDEF_STANDARD_C_1999;LFS_CONFIG=lfs_util_vsf.h;MBEDTLS_USER_CONFIG_FILE="component/3rd-party/mbedtls/port/platform_vsf.h";Z_HAVE_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>__VSF__;__CPU_X86__;__WIN__;__VSF_CPP__;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LV_CONF_INCLUDE_SIMPLE;HAS_STD_MALLOC;HAS_AWTK_CONFIG;FT2_BUILD_LIBRARY;PREDEF_STANDARD_C_1999;LFS_CONFIG=lfs_util_vsf.h;MBEDTLS_USER_CONFIG_FILE="component/3rd-party/mbedtls/port/platform_vsf.h";Z_HAVE_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\..\..\source;$(ProjectDir)..\..\..\..\source\shell\sys\linux\include;$(ProjectDir)..\..\..\..\source\shell\sys\linux\include\simple_libc;$(ProjectDir)..\..\..\..\source\shell\sys\linux\include\libusb;$(ProjectDir)..\..\..\..\source\shell\sys\linux\kernel\fs\vfs\files\terminfo;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\include\SDL2;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\include;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\3rd-party\SDL_ttf;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\3rd-party\SDL_image;$(ProjectDir)..\..\config;$(ProjectDir)..\..\config\3rd-party;$(ProjectDir)..\..\config\3rd-party\btstack;$(ProjectDir)..\..\config\3rd-party\lvgl;$(ProjectDir)..\..\config\3rd-party\lwip;$(ProjectDir)lib\npcap\Include;$(ProjectDir)lib\libwdi;$(ProjectDir)..\..\..\..\source\component\3rd-party\nnom\raw\inc;$(ProjectDir)..\..\..\..\source\component\3rd-party\nnom\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\lvgl\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\btstack\raw\src;$(ProjectDir)..\..\..\..\source\component\3rd-party\btstack\raw\chipset;$(ProjectDir)..\..\..\..\source\component\3rd-party\freetype\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\freetype\raw\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\vsfvm\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\raw\src\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\port\vsf;$(ProjectDir)..\..\..\..\source\component\3rd-party\coremark\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\coremark\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\libpng\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\libpng\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\lua\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\lua\extension\oo;$(ProjectDir)..\..\..\..\source\component\3rd-party\lua\extension\lovevsf;$(ProjectDir)..\..\..\..\source\component\3rd-party\zlib\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\libjpeg-turbo\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\libjpeg-turbo\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\mbedtls\raw\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\littlefs\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\littlefs\port;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-fms-extensions %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -1728,7 +1728,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>__VSF__;__CPU_X86__;__WIN__;__OOC_RELEASE__;__OOC_CPP__;NDEBUG;_CONSOLE;LV_CONF_INCLUDE_SIMPLE;HAS_STD_MALLOC;HAS_AWTK_CONFIG;FT2_BUILD_LIBRARY;PREDEF_STANDARD_C_1999;LFS_CONFIG=lfs_util_vsf.h;MBEDTLS_USER_CONFIG_FILE="component/3rd-party/mbedtls/port/platform_vsf.h";Z_HAVE_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>__VSF__;__CPU_X86__;__WIN__;__OOC_RELEASE__;__VSF_CPP__;NDEBUG;_CONSOLE;LV_CONF_INCLUDE_SIMPLE;HAS_STD_MALLOC;HAS_AWTK_CONFIG;FT2_BUILD_LIBRARY;PREDEF_STANDARD_C_1999;LFS_CONFIG=lfs_util_vsf.h;MBEDTLS_USER_CONFIG_FILE="component/3rd-party/mbedtls/port/platform_vsf.h";Z_HAVE_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\..\..\source;$(ProjectDir)..\..\..\..\source\shell\sys\linux\include;$(ProjectDir)..\..\..\..\source\shell\sys\linux\include\simple_libc;$(ProjectDir)..\..\..\..\source\shell\sys\linux\include\libusb;$(ProjectDir)..\..\..\..\source\shell\sys\linux\kernel\fs\vfs\files\terminfo;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\include\SDL2;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\include;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\3rd-party\SDL_ttf;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\3rd-party\SDL_image;$(ProjectDir)..\..\config;$(ProjectDir)..\..\config\3rd-party;$(ProjectDir)..\..\config\3rd-party\btstack;$(ProjectDir)..\..\config\3rd-party\lvgl;$(ProjectDir)..\..\config\3rd-party\lwip;$(ProjectDir)lib\npcap\Include;$(ProjectDir)lib\libwdi;$(ProjectDir)..\..\..\..\source\component\3rd-party\nnom\raw\inc;$(ProjectDir)..\..\..\..\source\component\3rd-party\nnom\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\lvgl\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\btstack\raw\src;$(ProjectDir)..\..\..\..\source\component\3rd-party\btstack\raw\chipset;$(ProjectDir)..\..\..\..\source\component\3rd-party\freetype\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\freetype\raw\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\vsfvm\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\raw\src\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\port\vsf;$(ProjectDir)..\..\..\..\source\component\3rd-party\coremark\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\coremark\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\libpng\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\libpng\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\lua\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\lua\extension\oo;$(ProjectDir)..\..\..\..\source\component\3rd-party\lua\extension\lovevsf;$(ProjectDir)..\..\..\..\source\component\3rd-party\zlib\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\libjpeg-turbo\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\libjpeg-turbo\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\mbedtls\raw\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\littlefs\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\littlefs\port;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
Expand Down
2 changes: 1 addition & 1 deletion example/tgui/project/vc/vsf_tgui_win.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>__VSF__;__CPU_X86__;__WIN__;__OOC_RELEASE__;__OOC_CPP__;WIN32;NDEBUG;_CONSOLE;LV_CONF_INCLUDE_SIMPLE;HAS_STD_MALLOC;HAS_AWTK_CONFIG;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>__VSF__;__CPU_X86__;__WIN__;__OOC_RELEASE__;__VSF_CPP__;WIN32;NDEBUG;_CONSOLE;LV_CONF_INCLUDE_SIMPLE;HAS_STD_MALLOC;HAS_AWTK_CONFIG;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\..\..\source;$(ProjectDir)..\..\..\..\source\shell\sys\linux\include;$(ProjectDir)..\..\..\..\source\shell\media\sdl2\include\SDL2;$(ProjectDir)..\..\..\..\source\shell\sys\xboot\include;$(ProjectDir)..\..\..\..\source\shell\sys\xboot\include\arch;$(ProjectDir)..\..\config;$(ProjectDir)lib\awtk\include;$(ProjectDir)lib\awtk\include\ext_widgets;$(ProjectDir)lib\npcap\Include;$(ProjectDir)lib\libwdi;$(ProjectDir)..\..\..\..\source\component\3rd-party\nnom\raw\inc;$(ProjectDir)..\..\..\..\source\component\3rd-party\nnom\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\littlevgl\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\btstack\raw\src;$(ProjectDir)..\..\..\..\source\component\3rd-party\btstack\raw\chipset;$(ProjectDir)..\..\..\..\source\component\3rd-party\freetype\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\freetype\raw\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\vsfvm\raw;$(ProjectDir)..\..\..\..\source\component\3rd-party\xboot\raw\src\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\xboot\raw\src\external\zlib-1.2.11;$(ProjectDir)..\..\..\..\source\component\3rd-party\xboot\raw\src\external\jpeg-9c;$(ProjectDir)..\..\..\..\source\component\3rd-party\xboot\raw\src\external\libpng-1.6.37;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\raw\src\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\lwip\2.1.2\port;$(ProjectDir)..\..\..\..\source\component\3rd-party\gato\raw\include;$(ProjectDir)..\..\..\..\source\component\3rd-party\nuklear\raw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
Expand Down
4 changes: 3 additions & 1 deletion source/kernel/vsf_kernel_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,10 @@ void __cmain(void)
|| __IS_COMPILER_ARM_COMPILER_5__ \
|| __IS_COMPILER_ARM_COMPILER_6__

#if defined(__VSF_CPP__) && __IS_COMPILER_SUPPORT_GNUC_EXTENSION__
#if defined(__VSF_CPP__) && VSF_USE_HEAP == ENABLED && VSF_ARCH_PROVIDE_HEAP != ENABLED
# if __IS_COMPILER_SUPPORT_GNUC_EXTENSION__
__attribute__((constructor(0)))
# endif
void __vsf_heap_init(void)
{
vsf_heap_init();
Expand Down

0 comments on commit 0e7dacc

Please sign in to comment.