mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Simply limiting the lookahead region to the size of the block device fixes the problem. Also added logic to limit the allocated region and floor to nearest word, since the additional memory couldn't really be used effectively.
		
			
				
	
	
		
			19 lines
		
	
	
		
			680 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			680 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| script:
 | |
|     # make sure example can at least compile
 | |
|     - sed -n '/``` c/,/```/{/```/d; p;}' README.md > test.c &&
 | |
|       CFLAGS='
 | |
|         -Duser_provided_block_device_read=NULL
 | |
|         -Duser_provided_block_device_prog=NULL
 | |
|         -Duser_provided_block_device_erase=NULL
 | |
|         -Duser_provided_block_device_sync=NULL
 | |
|         -include stdio.h -Werror' make all size
 | |
| 
 | |
|     # run tests
 | |
|     - make test
 | |
| 
 | |
|     # run tests with a few different configurations
 | |
|     - CFLAGS="-DLFS_READ_SIZE=1   -DLFS_PROG_SIZE=1"   make test
 | |
|     - CFLAGS="-DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" make test
 | |
|     - CFLAGS="-DLFS_BLOCK_COUNT=1023" make test
 | |
|     - CFLAGS="-DLFS_LOOKAHEAD=2047"   make test
 |