mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	Merge pull request #243 from OpenKNX/support-samd-flash-offset
support KNX_FLASH_OFFSET on samd
This commit is contained in:
		
						commit
						e4bb3e1c59
					
				@ -91,8 +91,13 @@ void SamdPlatform::init()
 | 
			
		||||
 | 
			
		||||
    // find end of program flash and set limit to next row
 | 
			
		||||
    uint32_t endEddr = (uint32_t)(&__etext + (&__data_end__ - &__data_start__)); // text + data MemoryBlock
 | 
			
		||||
#ifdef KNX_FLASH_OFFSET
 | 
			
		||||
    _MemoryStart = KNX_FLASH_OFFSET;
 | 
			
		||||
    _MemoryEnd = KNX_FLASH_OFFSET + KNX_FLASH_SIZE;
 | 
			
		||||
#else
 | 
			
		||||
    _MemoryStart = getRowAddr(_pageSize * _pageCnt - KNX_FLASH_SIZE - 1);        // 23295
 | 
			
		||||
    _MemoryEnd = getRowAddr(_pageSize * _pageCnt - 1);
 | 
			
		||||
#endif
 | 
			
		||||
    // chosen flash size is not available anymore
 | 
			
		||||
    if (_MemoryStart < endEddr) {
 | 
			
		||||
        println("KNX_FLASH_SIZE is not available (possible too much flash use by firmware)");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user