@@ -80,7 +80,7 @@ struct BitFieldManager
8080 {
8181 const BlockDeviceInfo* deviceInfo = m_blockDevice->GetDeviceInfo ();
8282
83- data = (BYTE*)private_malloc ( m_region->BytesPerBlock );
83+ data = (BYTE*)malloc ( m_region->BytesPerBlock );
8484
8585 if (data != NULL )
8686 {
@@ -99,7 +99,7 @@ struct BitFieldManager
9999 ConfigurationSector *pCfg = (ConfigurationSector*)data;
100100 memset ( (void *)&pCfg->SignatureCheck [ 0 ], 0xFF , sizeof (pCfg->SignatureCheck ) );
101101 m_blockDevice->Write ( m_cfgPhysicalAddress, m_region->BytesPerBlock ,data, FALSE );
102- private_free (data);
102+ free (data);
103103 }
104104 else
105105 {
@@ -150,7 +150,7 @@ struct BitFieldManager
150150 else
151151 {
152152 UINT32 length = m_region->BytesPerBlock ;
153- BYTE* dataptr = (BYTE*)private_malloc (length);
153+ BYTE* dataptr = (BYTE*)malloc (length);
154154
155155 if (dataptr != NULL )
156156 {
@@ -174,7 +174,7 @@ struct BitFieldManager
174174
175175 // write back to sector, as we only change one bit from 0 to 1, no need to erase sector
176176 m_blockDevice->Write ( m_cfgPhysicalAddress, length, dataptr, FALSE );
177- private_free (dataptr);
177+ free (dataptr);
178178 }
179179
180180 }
@@ -227,7 +227,7 @@ struct BitFieldManager
227227 UINT32 length = sizeof (ConfigurationSector);
228228
229229 memset ( &m_skipCfgSectorCheck, 0xff , sizeof (m_skipCfgSectorCheck) );
230- data = (BYTE*)private_malloc (length);
230+ data = (BYTE*)malloc (length);
231231 stream.Device ->Read ( m_cfgPhysicalAddress, length, (BYTE *)data );
232232 configSector = (ConfigurationSector*)data;
233233 m_signatureCheck = NULL ;
@@ -253,7 +253,7 @@ struct BitFieldManager
253253 m_signatureCheck = &m_skipCfgSectorCheck;
254254 }
255255
256- private_free (data);
256+ free (data);
257257
258258 }
259259 else // XIP device
@@ -476,7 +476,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
476476 {
477477 if (mode == AccessMemory_Check)
478478 {
479- bufPtr = (BYTE*) private_malloc (NumOfBytes);
479+ bufPtr = (BYTE*) malloc (NumOfBytes);
480480 if (!bufPtr) return false ;
481481 }
482482
@@ -486,7 +486,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
486486 {
487487 if (mode == AccessMemory_Check)
488488 {
489- private_free (bufPtr);
489+ free (bufPtr);
490490 }
491491
492492 break ;
@@ -495,7 +495,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
495495 if (mode == AccessMemory_Check)
496496 {
497497 *(UINT32*)buf = SUPPORT_ComputeCRC ( bufPtr, NumOfBytes, *(UINT32*)buf );
498- private_free (bufPtr);
498+ free (bufPtr);
499499 }
500500 }
501501 break ;
@@ -525,18 +525,18 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
525525 {
526526 if (g_ConfigBuffer != NULL )
527527 {
528- private_free (g_ConfigBuffer);
528+ free (g_ConfigBuffer);
529529 }
530530 g_ConfigBufferLength = 0 ;
531531
532- // g_ConfigBuffer = (UINT8*)private_malloc (pRegion->BytesPerBlock);
532+ // g_ConfigBuffer = (UINT8*)malloc (pRegion->BytesPerBlock);
533533 // Just allocate the configuration Sector size, configuration block can be large and not necessary to have that buffer.
534- g_ConfigBuffer = (UINT8*)private_malloc (g_ConfigBufferTotalSize);
534+ g_ConfigBuffer = (UINT8*)malloc (g_ConfigBufferTotalSize);
535535
536536 }
537537 else if (g_ConfigBufferTotalSize < ( g_ConfigBufferLength + lengthInBytes))
538538 {
539- UINT8* tmp = (UINT8*)private_malloc (g_ConfigBufferLength + lengthInBytes);
539+ UINT8* tmp = (UINT8*)malloc (g_ConfigBufferLength + lengthInBytes);
540540
541541 if (tmp == NULL )
542542 {
@@ -545,7 +545,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
545545
546546 memcpy ( tmp, g_ConfigBuffer, g_ConfigBufferLength );
547547
548- private_free (g_ConfigBuffer);
548+ free (g_ConfigBuffer);
549549
550550 g_ConfigBuffer = tmp;
551551 }
@@ -754,7 +754,7 @@ bool Loader_Engine::SignedDataState::VerifySignature( UINT8* signature, UINT32 l
754754 const BlockDeviceInfo* deviceInfo = m_pDevice->GetDeviceInfo ();
755755 if (!deviceInfo->Attribute .SupportsXIP )
756756 {
757- signCheckedAddr = (BYTE*)private_malloc (m_dataLength);
757+ signCheckedAddr = (BYTE*)malloc (m_dataLength);
758758 if (signCheckedAddr == NULL )
759759 {
760760 EraseMemoryAndReset ();
@@ -764,7 +764,7 @@ bool Loader_Engine::SignedDataState::VerifySignature( UINT8* signature, UINT32 l
764764 if (!m_pDevice->Read ( m_dataAddress, m_dataLength, signCheckedAddr ))
765765 {
766766 EraseMemoryAndReset ();
767- private_free (signCheckedAddr);
767+ free (signCheckedAddr);
768768
769769 return false ;
770770 }
@@ -791,7 +791,7 @@ bool Loader_Engine::SignedDataState::VerifySignature( UINT8* signature, UINT32 l
791791
792792 if (!deviceInfo->Attribute .SupportsXIP )
793793 {
794- private_free (signCheckedAddr);
794+ free (signCheckedAddr);
795795 }
796796
797797 return fret;
@@ -979,7 +979,7 @@ bool Loader_Engine::ProcessPayload( WP_Message* msg )
979979 LOADER_ENGINE_SETFLAG ( this , c_LoaderEngineFlag_ValidConnection );
980980
981981 // --//
982- #if defined(BIG_ENDIAN )
982+ #if defined(NETMF_TARGET_BIG_ENDIAN )
983983 SwapEndian ( msg, msg->m_payload , msg->m_header .m_size , false );
984984#endif
985985 size_t num;
@@ -1120,7 +1120,7 @@ bool Loader_Engine::TransmitMessage( const WP_Message* msg, bool fQueue )
11201120 UINT32 payloadSize;
11211121 UINT32 flags;
11221122
1123- #if !defined(BIG_ENDIAN )
1123+ #if !defined(NETMF_TARGET_BIG_ENDIAN )
11241124 payloadSize = msg->m_header .m_size ;
11251125 flags = msg->m_header .m_flags ;
11261126#else
@@ -1178,7 +1178,7 @@ void Loader_Engine::ReplyToCommand( WP_Message* msg, bool fSuccess, bool fCritic
11781178
11791179 msgReply.Initialize ( &m_controller );
11801180
1181- #if defined(BIG_ENDIAN )
1181+ #if defined(NETMF_TARGET_BIG_ENDIAN )
11821182 SwapEndian ( msg, ptr, size, true );
11831183#endif
11841184 msgReply.PrepareReply ( msg->m_header , flags, size, (UINT8*)ptr );
@@ -1203,7 +1203,7 @@ bool Loader_Engine::Monitor_Ping( WP_Message* msg )
12031203 CLR_DBG_Commands::Monitor_Ping::Reply cmdReply;
12041204 cmdReply.m_source = CLR_DBG_Commands::Monitor_Ping::c_Ping_Source_TinyBooter;
12051205
1206- #if defined(BIG_ENDIAN )
1206+ #if defined(NETMF_TARGET_BIG_ENDIAN )
12071207 cmdReply.m_dbg_flags = CLR_DBG_Commands::Monitor_Ping::c_Ping_DbgFlag_BigEndian;
12081208#endif
12091209
@@ -1542,7 +1542,7 @@ bool Loader_Engine::Monitor_FlashSectorMap( WP_Message* msg )
15421542
15431543 if (cnt == 1 )
15441544 {
1545- pData = (struct Flash_Sector *)private_malloc (rangeCount * sizeof (struct Flash_Sector ));
1545+ pData = (struct Flash_Sector *)malloc (rangeCount * sizeof (struct Flash_Sector ));
15461546
15471547 if (pData == NULL )
15481548 {
@@ -1582,12 +1582,12 @@ bool Loader_Engine::Monitor_FlashSectorMap( WP_Message* msg )
15821582
15831583 ReplyToCommand (msg, true , false , (void *)pData, rangeCount * sizeof (struct Flash_Sector ) );
15841584
1585- private_free (pData);
1585+ free (pData);
15861586
15871587 return true ;
15881588}
15891589
1590- #if defined(BIG_ENDIAN )
1590+ #if defined(NETMF_TARGET_BIG_ENDIAN )
15911591
15921592UINT32 Loader_Engine::SwapEndianPattern ( UINT8* &buffer, UINT32 size, UINT32 count )
15931593{
0 commit comments