Ignore:
Timestamp:
Apr 26, 2017, 2:14:33 PM (7 years ago)
Author:
alain
Message:

Modify the boot_info_t struct to describe external peripherals in all clusters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bootloader_tsar/boot_fat32.c

    r1 r6  
    148148{
    149149#if DEBUG_BOOT_FAT32   
    150     boot_printf("\n[BOOT] %s: Enters at cycle %d\n",
     150    boot_printf("\n[BOOT INFO] %s enters at cycle %d\n",
    151151                __FUNCTION__ , boot_get_proctime() );
    152152#endif
     
    163163
    164164#if DEBUG_BOOT_FAT32   
    165     boot_printf("\n[BOOT] %s: FSI Sector loaded at cycle %d\n",
     165    boot_printf("\n[BOOT INFO] %s : FSI Sector loaded at cycle %d\n",
    166166                __FUNCTION__ , boot_get_proctime() );
    167167#endif
     
    197197
    198198#if DEBUG_BOOT_FAT32   
    199     boot_printf("\n[BOOT] %s: free_clusters_nr = %x / free_cluster_hint = %x\n",
     199    boot_printf("\n[BOOT INFO] %s : free_clusters_nr = %x / free_cluster_hint = %x\n",
    200200                __FUNCTION__ , boot_fat.free_clusters_nr , boot_fat.free_cluster_hint );
    201201#endif
     
    430430
    431431#if DEBUG_BOOT_FAT32   
    432     boot_printf("\n[BOOT] %s: returns <%s> from <%s> at cycle %d\n",
     432    boot_printf("\n[BOOT INFO] %s : returns <%s> from <%s> at cycle %d\n",
    433433                __FUNCTION__ , path_component , pathname , boot_get_proctime() );
    434434#endif
     
    592592
    593593#if DEBUG_BOOT_FAT32   
    594     boot_printf("\n[BOOT] %s: Enters for <%s> file at cycle %d\n",
     594    boot_printf("\n[BOOT INFO] %s enters for <%s> file at cycle %d\n",
    595595                __FUNCTION__ , pathname, boot_get_proctime());
    596596#endif
     
    615615        while ( found == 0 )
    616616        {
    617 
    618 boot_printf("\n!!! enter second while for <%s> path_comp\n", path_comp );
    619 
    620617            cluster_lba = cluster_to_lba( parent_cluster );
    621618           
     
    646643                if (ord == LAST_ENTRY)             // no more entry in this directory
    647644                {
    648 
    649 boot_printf("\n@@@ for <%s> component / offset = %d : last entry\n", path_comp , offset );
    650 
    651645                    found = 2;
    652646                }
     
    654648                else if (ord == FREE_ENTRY)        // unused, check the next entry
    655649                {
    656 
    657 boot_printf("\n@@@ for <%s> component / offset = %d : free entry\n", path_comp , offset );
    658 
    659650                    continue;
    660651                }
     
    672663                    get_name_from_long(entry, buffer_lfn);
    673664
    674 boot_printf("\n@@@ for <%s> component / offset = %d : LFN entry = %s\n",
    675             path_comp , offset , buffer_lfn );
    676 
    677665                    // Append this portion of the name to the full name buffer
    678666                    boot_strcpy(name + 13 * (lfn_seq_order-1) , buffer_lfn);
     
    685673                {
    686674                    if (lfn_seq_elem_nr == 0) get_name_from_short(entry, name);
    687 
    688 boot_printf("\n@@@ for <%s> component / offset = %d : SFN entry = %s\n",
    689             path_comp , offset , name );
    690675
    691676                    // check if the full name is what we are looking for.
     
    725710        } // end second while for one component in pathname
    726711       
    727 boot_printf("\n### exit hwile fpr component <%s>\n", path_comp );
    728 
    729712        // Check the result of this path component search.
    730713        if (found == 2)
     
    755738
    756739#if DEBUG_BOOT_FAT32   
    757     boot_printf("\n[BOOT] fat_file_search(): "
    758                 "<%s> file of size %x found at cluster %x at cycle %d\n",
    759                 pathname, *file_size, *first_cluster, boot_get_proctime());
     740    boot_printf("\n[BOOT INFO] %s : <%s> file found at cycle %d\n"
     741                "    fat_cluster = %x / size = %x\n",
     742                __FUNCTION__ , pathname , boot_get_proctime() , *first_cluster , *file_size );
    760743#endif
    761744
     
    771754int boot_fat32_init()
    772755{
    773 
    774 boot_printf("@@@ BEFORE_VALUE = %x\n", FAT_MAGIC_VALUE);
    775 
    776756    // FAT32 initialization should be done only once
    777757    if (boot_fat.initialized == FAT_MAGIC_VALUE)
     
    783763
    784764#if DEBUG_BOOT_FAT32   
    785 boot_printf("\n[BOOT] %s: Enters at cycle %d\n",
     765boot_printf("\n[BOOT INFO] %s: Enters at cycle %d\n",
    786766            __FUNCTION__ , boot_get_proctime() );
    787767#endif
     
    799779
    800780#if DEBUG_BOOT_FAT32   
    801 boot_printf("\n[BOOT] %s: Boot Sector loaded at cycle %d\n",
     781boot_printf("\n[BOOT INFO] %s: Boot Sector loaded at cycle %d\n",
    802782            __FUNCTION__ , boot_get_proctime() );
    803 // unsigned char * data = boot_fat.block_buffer;
    804 // uint32_t   byte;
    805 // for( byte = 0 ; byte < 16 ; byte++ ) boot_printf("%d : %x\n", byte , data[byte] );
    806783#endif
    807784
     
    865842    boot_fat.initialized    = FAT_MAGIC_VALUE;
    866843
    867 boot_printf("@@@ AFTER_VALUE = %x\n", FAT_MAGIC_VALUE);
    868 
    869 fat32_desc_display();
    870    
    871844    // Set information from FS Information Sector
    872845    if (set_fsi()) return -1;
     
    878851#if DEBUG_BOOT_FAT32   
    879852    fat32_desc_display();
    880     boot_printf("\n[BOOT] boot_fat32_init(): FAT32 File System initialized at cycle %d\n",
    881                 boot_get_proctime());
     853    boot_printf("\n[BOOT INFO] %s : FAT32 File System initialized at cycle %d\n",
     854                __FUNCTION__ , boot_get_proctime() );
    882855#endif
    883856
     
    907880
    908881#if DEBUG_BOOT_FAT32   
    909     boot_printf("\n[BOOT] %s: Enters for file <%s> at cycle %d\n",
     882    boot_printf("\n[BOOT INFO] %s enters for file <%s> at cycle %d\n",
    910883                __FUNCTION__ , pathname, boot_get_proctime() );
    911884#endif
     
    973946
    974947#if DEBUG_BOOT_FAT32   
    975     boot_printf("\n[BOOT] boot_fat32_load(): "
    976                 "File <%s> of size %x loaded at address %x at cycle %d\n",
    977                 pathname, size, buff_addr, boot_get_proctime());
     948    boot_printf("\n[BOOT INFO] %s : file <%s> loaded at cycle %d\n"
     949                "    address = %x , size = %x\n",
     950                __FUNCTION__ , pathname , boot_get_proctime() , buff_addr , size );
    978951#endif
    979952
Note: See TracChangeset for help on using the changeset viewer.