@@ -24,7 +24,7 @@ static bool withErrorLoading = false;
2424// #define LUA_HEAD_RAM_SECTION CCM_OPTIONAL
2525// #endif
2626
27- static char luaUserHeap[ LUA_USER_HEAP ]
27+ CH_HEAP_AREA ( luaUserHeap, LUA_USER_HEAP )
2828#ifdef EFI_HAS_EXT_SDRAM
2929SDRAM_OPTIONAL
3030#endif
@@ -44,7 +44,7 @@ class Heap {
4444
4545 size_t m_memoryUsed = 0 ;
4646 size_t m_size;
47- char * m_buffer;
47+ uint8_t * m_buffer;
4848
4949 void * alloc (size_t n) {
5050 return chHeapAlloc (&m_heap, n);
@@ -56,12 +56,12 @@ class Heap {
5656
5757public:
5858 template <size_t TSize>
59- Heap (char (&buffer)[TSize])
59+ Heap (uint8_t (&buffer)[TSize])
6060 {
6161 reinit (buffer, TSize);
6262 }
6363
64- void reinit (char *buffer, size_t size) {
64+ void reinit (uint8_t *buffer, size_t size) {
6565 criticalAssertVoid (m_memoryUsed == 0 , " Too late to reinit Lua heap" );
6666
6767 m_size = size;
@@ -413,8 +413,8 @@ void startLua() {
413413 // on Hellen a bit of open question what's the best track
414414 if (isStm32F42x ()) {
415415 // This is safe to use section base and end as we define ram3 for all F4 chips
416- extern char __ram3_base__[];
417- extern char __ram3_end__[];
416+ extern uint8_t __ram3_base__[];
417+ extern uint8_t __ram3_end__[];
418418 userHeap.reinit (__ram3_base__, __ram3_end__ - __ram3_base__);
419419 }
420420#endif // !EFI_IS_F42x
0 commit comments