Ignore:
Timestamp:
Jun 25, 2014, 2:19:37 PM (10 years ago)
Author:
cfuguet
Message:

giet_vm optimizations:

  • Several modifications in GIET_VM in order to support compilation with GCC optimizations (-O2) activated.
  • Adding missing volatile in some global variables.
  • Using ioread and iowrite utility functions in peripheral drivers which prevent GCC to remove writes or reads in hardware memory mapped registers.
  • Code refactoring of stdio printf functions. Now, shr_printf and tty_printf function reuse the same function body. The only difference is that shr_printf wraps printf function call with TTY get lock and release lock.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_fat32/fat32.c

    r337 r345  
    533533                    (ord  != NO_MORE_ENTRY ) )         // SFN entry : checked
    534534            {
    535                 _memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
     535                memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
    536536            }
    537537            else if (ord == NO_MORE_ENTRY )            // end of directory : return
     
    552552                    (ord != NO_MORE_ENTRY) )           // LFN entry : checked
    553553            {
    554                 _memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
     554                memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
    555555            }
    556556            else if ( (attr != ATTR_LONG_NAME_MASK) &&
     
    910910                          (ord  != NO_MORE_ENTRY ) )         // SFN entry : checked
    911911                {
    912                     _memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
     912                    memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
    913913                    offset = offset + DIR_ENTRY_SIZE;
    914914                }
     
    929929                    (ord != NO_MORE_ENTRY) )                 // LFN entry : checked
    930930                {
    931                     _memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
     931                    memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
    932932                    offset = offset + DIR_ENTRY_SIZE;
    933933                }
     
    980980        else    // file found
    981981        {
    982             _memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
     982            memcpy( dir_entry, fat.fat_cache + offset, DIR_ENTRY_SIZE );   
    983983            offset     = offset + DIR_ENTRY_SIZE;
    984984            *file_size = read_entry( DIR_FILE_SIZE, dir_entry, 1 );
Note: See TracChangeset for help on using the changeset viewer.