[Programmation] prog bootloader sur pic32mx795f512l
Répondre à la discussion
Page 1 sur 2 1 DernièreDernière
Affichage des résultats 1 à 30 sur 54

prog bootloader sur pic32mx795f512l



  1. #1
    davidif

    prog bootloader sur pic32mx795f512l


    ------

    Bonjour,

    J'essai difficilement de configurer un bootloader pour pouvoir charger mon prog via USB.

    J'utilise donc un prog bootloader qui fonctionnait déjà avec un autre programme fait antérieurement, ou je chargeai donc ce programme puis chargeais le .hex du programme principal.

    Pour ça, j'ai donc adapter les zones mémoires, tant sur le prog bootloader et le prog principal dans les fichiers linker.

    Actuellement, mon prog bootloader ce charge bien et je boot bien dessus pour charger mon prog principal, seulement une fois charger,mon nouveau programme principal ne tourne pas.

    ce qui est bizarre, c'est que mon nouveau programme n'utilise pas de fichier linker btl_mx.ld et quand j'ajoute donc ce fichier j'ai un packet d'erreur à la compilation alors que si je le retire du projet, tout tourne bien.

    Je programme sous mplab x ide v3.26 sous harmony et implémente une stack ethernet

    zone memoire bootloader

    Code:

    Code:
    Code:
    /* Default linker script, for normal executables */
    OUTPUT_FORMAT("elf32-tradlittlemips")
    OUTPUT_ARCH(pic32mx)
    ENTRY(_reset)
    /*
     * Provide for a minimum stack and heap size
     * - _min_stack_size - represents the minimum space that must be made
     *                     available for the stack.  Can be overridden from
     *                     the command line using the linker's --defsym option.
     * - _min_heap_size  - represents the minimum space that must be made
     *                     available for the heap.  Can be overridden from
     *                     the command line using the linker's --defsym option.
     */
    EXTERN (_min_stack_size _min_heap_size)
    PROVIDE(_min_stack_size = 0x400) ;
    /* PROVIDE(_min_heap_size = 0) ; Defined on the command line */
    /**************************************************  ***********************
     * Processor-specific object file.  Contains SFR definitions.
     **************************************************  ***********************/
    INPUT("processor.o")
    
    /**************************************************  ***********************
     * Processor-specific peripheral libraries are optional
     **************************************************  ***********************/
    OPTIONAL("libmchp_peripheral.a")
    OPTIONAL("libmchp_peripheral_32MX795F512L.a")
    
    /**************************************************  ***********************
     * For interrupt vector handling
     **************************************************  ***********************/
    PROVIDE(_vector_spacing = 0x00000001);
    _ebase_address =  0x9FC01000;
    
    /**************************************************  ***********************
     * Memory Address Equates
     * _RESET_ADDR      -- Reset Vector
     * _BEV_EXCPT_ADDR  -- Boot exception Vector
     * _DBG_EXCPT_ADDR  -- In-circuit Debugging Exception Vector
     * _DBG_CODE_ADDR   -- In-circuit Debug Executive address
     * _DBG_CODE_SIZE   -- In-circuit Debug Executive size
     * _GEN_EXCPT_ADDR  -- General Exception Vector
     **************************************************  ***********************/
    _RESET_ADDR              = 0xBFC00000;
    _BEV_EXCPT_ADDR          = (0xBFC00000 + 0x380);
    _DBG_EXCPT_ADDR          = (0xBFC00000 + 0x480);
    _DBG_CODE_ADDR          = 0xBFC02000;
    _DBG_CODE_SIZE           = 0xFF0     ;
    _GEN_EXCPT_ADDR          = _ebase_address + 0x180;
    
    /**************************************************  ***********************
     * Memory Regions
     *
     * Memory regions without attributes cannot be used for orphaned sections.
     * Only sections specifically assigned to these regions can be allocated
     * into these regions.
     **************************************************  ***********************/
    MEMORY
    {
      kseg0_program_mem    (rx)  : ORIGIN = 0x9D000000, LENGTH = 0x6000 /* All C Files will be located here */
      kseg0_boot_mem             : ORIGIN = 0x9FC00490, LENGTH = 0x0 /* This memory region is dummy */
      exception_mem              : ORIGIN = 0x9FC01000, LENGTH = 0x1000 /* Interrupt vector table */
      kseg1_boot_mem             : ORIGIN = 0xBFC00000, LENGTH = 0x490 /* C Startup code */
      debug_exec_mem             : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
      config3                    : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
      config2                    : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
      config1                    : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
      config0                    : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
      kseg1_data_mem       (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x20000
      sfrs                       : ORIGIN = 0xBF800000, LENGTH = 0x100000
      configsfrs                 : ORIGIN = 0xBFC02FF0, LENGTH = 0x10
    zone mémoire programme principal non modifier

    Code:
    zone mémoire programme principal non modifier
    
    Code:
    /* Default linker script, for normal executables */
    OUTPUT_FORMAT("elf32-tradlittlemips")
    OUTPUT_ARCH(pic32mx)
    ENTRY(_reset)
    /*
     * Provide for a minimum stack and heap size
     * - _min_stack_size - represents the minimum space that must be made
     *                     available for the stack.  Can be overridden from
     *                     the command line using the linker's --defsym option.
     * - _min_heap_size  - represents the minimum space that must be made
     *                     available for the heap.  Can be overridden from
     *                     the command line using the linker's --defsym option.
     */
    EXTERN (_min_stack_size _min_heap_size)
    
    /**************************************************  ***********************
     * Processor-specific object file.  Contains SFR definitions.
     **************************************************  ***********************/
    INPUT("processor.o")
    
    
    /**************************************************  ***********************
     * Processor-specific peripheral libraries are optional
     **************************************************  ***********************/
    OPTIONAL("libmchp_peripheral.a")
    
    /**************************************************  ***********************
     * For interrupt vector handling
     **************************************************  ***********************/
    PROVIDE(_vector_spacing = 0x00000001);
    _ebase_address =  0x9FC01000;
    
    /**************************************************  ***********************
     * Memory Address Equates
     * _RESET_ADDR      -- Reset Vector
     * _BEV_EXCPT_ADDR  -- Boot exception Vector
     * _DBG_EXCPT_ADDR  -- In-circuit Debugging Exception Vector
     * _DBG_CODE_ADDR   -- In-circuit Debug Executive address
     * _DBG_CODE_SIZE   -- In-circuit Debug Executive size
     * _GEN_EXCPT_ADDR  -- General Exception Vector
     **************************************************  ***********************/
    _RESET_ADDR              = 0xBFC00000;  
    _BEV_EXCPT_ADDR          = (0xBFC00000 + 0x380);
    _DBG_EXCPT_ADDR          = (0xBFC00000 + 0x480);
    _DBG_CODE_ADDR          = 0xBFC02000;
    _DBG_CODE_SIZE           = 0xFF0     ;
    _GEN_EXCPT_ADDR          = _ebase_address + 0x180;
    
    /**************************************************  ***********************
     * Memory Regions
     *
     * Memory regions without attributes cannot be used for orphaned sections.
     * Only sections specifically assigned to these regions can be allocated
     * into these regions.
     **************************************************  ***********************/
    MEMORY
    {
      kseg0_program_mem    (rx)  : ORIGIN = 0x9D000000, LENGTH = 0xE000 /* All C Files will be located here */
      kseg0_boot_mem             : ORIGIN = 0x9FC00490, LENGTH = 0x0 /* This memory region is dummy */ 
      exception_mem              : ORIGIN = 0x9FC01000, LENGTH = 0x200 /* Interrupt vector table */
      config3                    : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
      config2                    : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
      config1                    : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
      config0                    : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
      kseg1_boot_mem             : ORIGIN = 0xBFC00000, LENGTH = 0x490 /* C Startup code */
      kseg1_data_mem       (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x20000
      sfrs                       : ORIGIN = 0xBF800000, LENGTH = 0x100000
      debug_exec_mem             : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
      configsfrs                 : ORIGIN = 0xBFC02FF0, LENGTH = 0x10
    Merci pour votre aide

    -----

  2. #2
    davidif

    Re : prog bootloader sur pic32mx795f512l

    j'ai mis une partie des erreur car il y en un packet :

    Code:
    uild/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2081437825/wdrv_mrf24wn_events.o: Link Error: Could not allocate section .text.WDRV_PendingEventProcess, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2081437825/wdrv_mrf24wn_main.o: Link Error: Could not allocate section .text.WDRV_MRF24WN_RegisterStatisticsGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2081437825/wdrv_mrf24wn_main.o: Link Error: Could not allocate section .text.WDRV_MRF24WN_Process, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2081437825/wdrv_mrf24wn_main.o: Link Error: Could not allocate section .text.WDRV_MRF24WN_StatisticsGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2081437825/wdrv_mrf24wn_main.o: Link Error: Could not allocate section .text.WDRV_MRF24WN_Reinitialize, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2081437825/wdrv_mrf24wn_main.o: Link Error: Could not allocate section .text.WDRV_MRF24WN_Status, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2081437825/wdrv_mrf24wn_main.o: Link Error: Could not allocate section .text.WDRV_MRF24WN_GetConfig, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1891376032/sys_command.o: Link Error: Could not allocate section .text.GetCommandCharacter, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2137108136/sys_debug.o: Link Error: Could not allocate section .text.SYS_DEBUG_ErrorLevelGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/482662494/sys_devcon.o: Link Error: Could not allocate section .text.SYS_DEVCON_Tasks, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1750042194/sys_fs.o: Link Error: Could not allocate section .rodata, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/2110151058/sys_tmr.o: Link Error: Could not allocate section .rodata, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/tcp.o: Link Error: Could not allocate section .text.TCPIP_TLSTCP_StillHandshaking, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/tcp.o: Link Error: Could not allocate section .text.TCPIP_TLSTCP_SocketIsSecuredByTLS, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/dhcp.o: Link Error: Could not allocate section .text.TCPIP_DHCP_IsEnabled, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/dhcp.o: Link Error: Could not allocate section .text.TCPIP_DHCP_IsActive, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/dhcp.o: Link Error: Could not allocate section .text.TCPIP_DHCP_Disable, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/dhcp.o: Link Error: Could not allocate section .text.TCPIP_DHCP_Enable, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/dhcp.o: Link Error: Could not allocate section .text.TCPIP_DHCP_Renew, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/dhcp.o: Link Error: Could not allocate section .text.TCPIP_DHCP_Request, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/dhcp.o: Link Error: Could not allocate section .text.TCPIP_DHCP_InfoGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionFileGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionPostSmGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionPostSmSet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionDataBufferGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionStatusSet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionHasArgsSet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionByteCountGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/http.o: Link Error: Could not allocate section .text.TCPIP_HTTP_CurrentConnectionSocketGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/tcpip_manager.o: Link Error: Could not allocate section .text.TCPIP_STACK_NetDefaultGet, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/tcpip_manager.o: Link Error: Could not allocate section .text.TCPIP_STACK_DNSServiceCanStart, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1164207549/tcpip_packet.o: Link Error: Could not allocate section .text.TCPIP_PKT_Deinitialize, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/373060831/list.o: Link Error: Could not allocate section .text.vListInitialiseItem, size = 8 bytes, attributes = code 
    storerecall.o: Link Error: Could not allocate section .text, size = 8 bytes, attributes = code 
    default-on-reset.o: Link Error: Could not allocate section .text._on_reset, size = 8 bytes, attributes = code 
    default-on-bootstrap.o: Link Error: Could not allocate section .text._on_bootstrap, size = 8 bytes, attributes = code 
    build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1282498059/port.o: Link Error: Could not allocate section .rodata, size = 4 bytes, attributes = code 
     Link Error: Could not allocate program memory
    collect2.exe: error: ld returned 255 exit status
    make[2]: *** [dist/pic32mx_eth_sk+ioexp+11n+freertos/production/pic32_eth_wifi_web_server.X.production.hex] Error 255
    make[1]: *** [.build-conf] Error 2
    make: *** [.build-impl] Error 2
    
    BUILD FAILED (exit value 2, total time: 18s)
    Dernière modification par davidif ; 23/07/2016 à 17h02.

  3. #3
    davidif

    Re : prog bootloader sur pic32mx795f512l

    En fait, mon prog d'origine ne possédait pas de fichier linker, donc comment attribut-il les zones mémoires ? lorsque j'insère le fichier linker compris dans les répertoires du projet mais pas dans l'éditeur, il ne ce compile pas.

  4. #4
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Salut, gofio79 t'avait expliqué en 2013 que :
    - le programme bootloader peut se compiler avec le linker script par défaut, car il se place en début de flash.
    - le programme à bootloader doit avoir son propre linker script, car son implantation est décalée, il est placé après le bootloader dans la flash.
    - il faut déclarer dans le source du programme bootloader, la taille des zones flash à effacer/programmer et l'adresse du jump start.
    Est-ce que avec Harmony, c'est différent ou pas, ça je sais pas.

    http://forums.futura-sciences.com/el...95f512l-2.html

  5. A voir en vidéo sur Futura
  6. #5
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Bonjour,

    j'ai décidé de travailler sur le bootloader, pour évidemment pouvoir faire les mise à jours en usb d'un fichier .hex

    et sur harmony, qui est sensé faciliter les choses, évidemment me met le bazzare (: sur un linker déjà utilisé avec succès sur le même micro

    a priori, l'erreur que j'ai doit certainement parler rapidement à un pro mais moi je ne vois pas encore ce que ce doit être.

    Code:
     Link Warning: absolute section '_047ab0c057e3aa5f' crosses the boundary of region kseg0_program_mem.
     Link Error: Could not allocate section '_047ab0c057e3aa5f' at 0x9d000000
     Link Error: Could not allocate program memory
    collect2.exe: error: ld returned 255 exit status
    make[2]: *** [dist/pic32mx_eth_sk+ioexp+11n+freertos/production/pic32_eth_wifi_web_server.X.production.hex] Error 255
    make[1]: *** [.build-conf] Error 2
    make: *** [.build-impl] Error 2
    nbproject/Makefile-pic32mx_eth_sk+ioexp+11n+freertos.mk:1539: recipe for target 'dist/pic32mx_eth_sk+ioexp+11n+freertos/production/pic32_eth_wifi_web_server.X.production.hex' failed
    make[2]: Leaving directory 'C:/Users/Tecwave/disque 1t/etude/hardware/Programme PIC32/WIFI/N V1.2/apps/tcpip/web_server_nvm_mpfs/firmware/pic32_eth_wifi_web_server.X'
    nbproject/Makefile-pic32mx_eth_sk+ioexp+11n+freertos.mk:78: recipe for target '.build-conf' failed
    make[1]: Leaving directory 'C:/Users/Tecwave/disque 1t/etude/hardware/Programme PIC32/WIFI/N V1.2/apps/tcpip/web_server_nvm_mpfs/firmware/pic32_eth_wifi_web_server.X'
    nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
    
    BUILD FAILED (exit value 2, total time: 15s)
    Mes emplacements mémoire :

    Code:
      /* Default linker script, for normal executables */
    OUTPUT_FORMAT("elf32-tradlittlemips")
    OUTPUT_ARCH(pic32mx)
    ENTRY(_reset)
    /*
     * Provide for a minimum stack and heap size
     * - _min_stack_size - represents the minimum space that must be made
     *                     available for the stack.  Can be overridden from
     *                     the command line using the linker's --defsym option.
     * - _min_heap_size  - represents the minimum space that must be made
     *                     available for the heap.  Can be overridden from
     *                     the command line using the linker's --defsym option.
     */
    EXTERN (_min_stack_size _min_heap_size)
    PROVIDE(_min_stack_size = 0x400) ;
    PROVIDE(_min_heap_size = 0) ; /*Defined on the command line */
    /*************************************************************************
     * Processor-specific object file.  Contains SFR definitions.
     *************************************************************************/
    INPUT("processor.o")
    
    /*************************************************************************
     * Processor-specific peripheral libraries are optional
     *************************************************************************/
    OPTIONAL("libmchp_peripheral.a")
    OPTIONAL("libmchp_peripheral_32MX795F512L.a")
    
    _ramfunc_begin = 0;
    
    /*************************************************************************
     * For interrupt vector handling
     *************************************************************************/
    PROVIDE(_vector_spacing = 0x00000001);
    _ebase_address  = 0x9D006000;
    
    /*************************************************************************
     * Memory Address Equates
     *************************************************************************/
    _RESET_ADDR              = (0x9D006000 + 0x1000 + 0x970);
    _BEV_EXCPT_ADDR          = (0x9D006000 + 0x1000 + 0x970 + 0x380);
    _DBG_EXCPT_ADDR          = (0x9D006000 + 0x1000 + 0x970 + 0x480);
    _DBG_CODE_ADDR           = 0xBFC02000;
    _DBG_CODE_SIZE           = 0xFF0     ;
    _GEN_EXCPT_ADDR          = _ebase_address + 0x180;
    
    /*************************************************************************
     * Memory Regions
     *
     * Memory regions without attributes cannot be used for orphaned sections.
     * Only sections specifically assigned to these regions can be allocated
     * into these regions.
     *************************************************************************/
    MEMORY
    {
      Flash_memory               : ORIGIN = 0x9D070000, LENGTH = 10000
      kseg0_program_mem    (rx)  : ORIGIN = (0x9D006000 + 0x1000 + 0x970 + 0x490), 	LENGTH = (0x80000 - 0x6000 - 0x1000 - 0x970 - 0x490-0x10000)
      kseg0_boot_mem             : ORIGIN = (0x9D006000 + 0x1000), 					LENGTH = 0x970
      exception_mem              : ORIGIN =  0x9D006000, 							LENGTH = 0x1000 /* Dummy IVT to fool the linker. This code uses no ISR*/
      kseg1_boot_mem             : ORIGIN = (0x9D006000 + 0x1000 + 0x970), 			LENGTH = 0x490
      debug_exec_mem             : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
      config3                    : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
      config2                    : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
      config1                    : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
      config0                    : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
      kseg1_data_mem       (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x18000
      sfrs                       : ORIGIN = 0xBF800000, LENGTH = 0x10000
      configsfrs                 : ORIGIN = 0xBFC02FF0, LENGTH = 0x10
    seriez-vous ou serait le problème
    Merci

  7. #6
    davidif

    Re : prog bootloader sur pic32mx795f512l

    j'ai donc retrouvé un fichier linker qui passe

    p32MX795F512L.ld par contre , je dois le modifier pour mon fichier boot

  8. #7
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Bonjour, as-tu essayé de passer par Harmony pour créer ton bootloader ?
    D'abord créer un projet vide Harmony, puis dans MHC cocher créer bootloader USB device Cela génère le programme bootloader.
    Ensuite charger le projet appli, et dans MHC cocher appli bootloader USB device.

    Les 2 programmes, bootloader et appli, auront chacun leur linker script, dans leur dossier system_config, et devraient bien s'entendre.
    Les secteurs de la flash qui contiennent tes paramètres seront sans doute effacés, mais c'est à voir plus tard.

  9. #8
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Bonjour satinas,

    alors en fait, j'ai déjà tenter de cocher option bootloader dans mon programme principal et ça ma généré un packet d'erreur qui m'ont fait peur à l'époque , mais maintenant que tu m'en parle je viens de me demander si j'ai pas confondu l'option bootloader application et programme bootloader , et c'est peut-être pour ça que j'ai eu c'est erreur , je regarde ça tout de suite

    merci

  10. #9
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Alors , effectivement j'avais pas fait la distinction entre le prog boot et le prog appli, mais ce qui n'empèche pas les complications bien qu'il y est beaucoup moins d'erreur.

    Harmony m'a bien généré un fichier linker "btl_mx.ld"

    seulement il me met des erreurs

    Code:
    nbproject/Makefile-pic32mx_eth_sk+ioexp+11n+freertos.mk:1539: recipe for target 'dist/pic32mx_eth_sk+ioexp+11n+freertos/production/pic32_eth_wifi_web_server.X.production.hex' failed
    make[2]: Leaving directory 'C:/Users/Tecwave/disque 1t/etude/hardware/Programme PIC32/WIFI/N V1.2/apps/tcpip/web_server_nvm_mpfs/firmware/pic32_eth_wifi_web_server.X'
    nbproject/Makefile-pic32mx_eth_sk+ioexp+11n+freertos.mk:78: recipe for target '.build-conf' failed
    make[1]: Leaving directory 'C:/Users/Tecwave/disque 1t/etude/hardware/Programme PIC32/WIFI/N V1.2/apps/tcpip/web_server_nvm_mpfs/firmware/pic32_eth_wifi_web_server.X'
    nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
     Link Warning: absolute section '_048b30c057e6c023' crosses the boundary of region kseg0_program_mem.
     Link Error: Could not allocate section '_048b30c057e6c023' at 0x9d000000
     Link Error: Could not allocate program memory
    collect2.exe: error: ld returned 255 exit status
    make[2]: *** [dist/pic32mx_eth_sk+ioexp+11n+freertos/production/pic32_eth_wifi_web_server.X.production.hex] Error 255
    make[1]: *** [.build-conf] Error 2
    make: *** [.build-impl] Error 2
    
    BUILD FAILED (exit value 2, total time: 18s)
    le linker généré est le suivant

    Code:
    /*************************************************************************
     * For interrupt vector handling
     *************************************************************************/
    PROVIDE(_vector_spacing = 0x00000001);
    _ebase_address =  0x9D00E000;
    
    /*************************************************************************
     * Memory Address Equates
     * _RESET_ADDR      -- Reset Vector
     * _BEV_EXCPT_ADDR  -- Boot exception Vector
     * _DBG_EXCPT_ADDR  -- In-circuit Debugging Exception Vector
     * _DBG_CODE_ADDR   -- In-circuit Debug Executive address
     * _DBG_CODE_SIZE   -- In-circuit Debug Executive size
     * _GEN_EXCPT_ADDR  -- General Exception Vector
     *************************************************************************/
    _RESET_ADDR              = (0x9D00E000 + 0x1000);  
    _BEV_EXCPT_ADDR          = ((0x9D00E000 + 0x1000) + 0x380);
    _DBG_EXCPT_ADDR          = ((0x9D00E000 + 0x1000) + 0x480);
    _DBG_CODE_ADDR          = 0xBFC02000;
    _DBG_CODE_SIZE           = 0xFF0     ;
    _GEN_EXCPT_ADDR          = _ebase_address + 0x180;
    
    /*************************************************************************
     * Memory Regions
     *
     * Memory regions without attributes cannot be used for orphaned sections.
     * Only sections specifically assigned to these regions can be allocated
     * into these regions.
     *************************************************************************/
    MEMORY
    {
      kseg0_program_mem    (rx)  : ORIGIN = (0x9D001000 + 0xE000 + 0x490), LENGTH = 0x80000 - (0xE000 + 0x490) /* All C Files will be located here */
      kseg0_boot_mem             : ORIGIN = 0x9D00E000, LENGTH = 0x0 /* This memory region is dummy */
      exception_mem              : ORIGIN = 0x9D00E000, LENGTH = 0x200 /* Interrupt vector table */
      config3                    : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
      config2                    : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
      config1                    : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
      config0                    : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
      kseg1_boot_mem             : ORIGIN = (0x9D00E000 + 0x1000), LENGTH = 0x490 /* C Startup code */
      kseg1_data_mem       (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x20000
      sfrs                       : ORIGIN = 0xBF800000, LENGTH = 0x100000
      debug_exec_mem             : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
      configsfrs                 : ORIGIN = 0xBFC02FF0, LENGTH = 0x10

    alors que dans mon fichier system_config.h

    Code:
    #define DRV_NVM_MEDIA_SIZE              64
    #define DRV_NVM_MEDIA_START_ADDRESS     0x9D000000
    
    #define WDRV_NVM_MY_CONFIG_ADDR       0xE000

  11. #10
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Tu es censé avoir fait 2 compilations de 2 projets différents. Tu balances des fichiers sans dire d'où il sortent, quelle compilation a marché ou pas.
    Faudrait que tu te forces un peu à être précis, parce que pour te suivre, faut s'accrocher ...

  12. #11
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Désolé, en fait j'ai compilé mon programme principal pour le moment, j'essai de faire en sorte qu'il ce compile avant d’approfondir le programme boot.

    J'ai aussi fait un nouveau programme boot également, celui-ci ce compile bien mais mon poste précédent concerne le programme principal

    J'ai du mal à comprendre comment s'organise la mémoire pour l'instant, faut que je fasse un point sur ça
    Dernière modification par davidif ; 24/09/2016 à 19h50.

  13. #12
    davidif

    Re : prog bootloader sur pic32mx795f512l

    là j'ai le linker du programme boot

    Code:
    /*************************************************************************
     * For interrupt vector handling
     *************************************************************************/
    PROVIDE(_vector_spacing = 0x00000001);
    _ebase_address =  0x9FC01000;
    
    /*************************************************************************
     * Memory Address Equates
     * _RESET_ADDR      -- Reset Vector
     * _BEV_EXCPT_ADDR  -- Boot exception Vector
     * _DBG_EXCPT_ADDR  -- In-circuit Debugging Exception Vector
     * _DBG_CODE_ADDR   -- In-circuit Debug Executive address
     * _DBG_CODE_SIZE   -- In-circuit Debug Executive size
     * _GEN_EXCPT_ADDR  -- General Exception Vector
     *************************************************************************/
    _RESET_ADDR              = 0xBFC00000;  
    _BEV_EXCPT_ADDR          = (0xBFC00000 + 0x380);
    _DBG_EXCPT_ADDR          = (0xBFC00000 + 0x480);
    _DBG_CODE_ADDR          = 0xBFC02000;
    _DBG_CODE_SIZE           = 0xFF0;
    _GEN_EXCPT_ADDR          = _ebase_address + 0x180;
    
    /*************************************************************************
     * Memory Regions
     *
     * Memory regions without attributes cannot be used for orphaned sections.
     * Only sections specifically assigned to these regions can be allocated
     * into these regions.
     *************************************************************************/
    MEMORY
    {
      kseg0_program_mem    (rx)  : ORIGIN = 0x9D000000, LENGTH = 0x7000 /* All C Files will be located here */ 
      kseg0_boot_mem             : ORIGIN = 0x9FC00490, LENGTH = 0x0 /* This memory region is dummy */ 
      exception_mem              : ORIGIN = 0x9FC01000, LENGTH = 0x1000  /* Interrupt vector table */
      config3                    : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
      config2                    : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
      config1                    : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
      config0                    : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
      kseg1_boot_mem             : ORIGIN = 0xBFC00000, LENGTH = 0x300 /* C Startup code */
      kseg1_data_mem       (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x20000
      sfrs                       : ORIGIN = 0xBF800000, LENGTH = 0x100000
      debug_exec_mem             : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
      configsfrs                 : ORIGIN = 0xBFC02FF0, LENGTH = 0x10
    }
    Dernière modification par davidif ; 24/09/2016 à 19h54.

  14. #13
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Commence par vérifier ton programme bootloader, avant de passer à l'appli.
    Charge le dans le pic, et vérifier qu'il dialogue bien avec le logiciel côté PC.
    Tous tes listings, je les regarde pas, pas la peine de les envoyer ...

  15. #14
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Citation Envoyé par satinas Voir le message
    Commence par vérifier ton programme bootloader, avant de passer à l'appli.
    Charge le dans le pic, et vérifier qu'il dialogue bien avec le logiciel côté PC.
    Tous tes listings, je les regarde pas, pas la peine de les envoyer ...
    OK je vais vérifier le programme boot, seulement c'est également important que le programme principal ce compile bien je suppose.

    Mon ancien prog boot, ce déclenchait sur l'apui d'un switch à 1 au démarrage, ce qui fonctionne sur ma carte d’ailleurs, faut que j'essai de faire pareil avec le nouveau

    Après je balance mes listings, pour amener des infos qui pourrai apporter des solutions que je ne perçois pas forcement

  16. #15
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Il faut travailler par étape, toi tu commences par la fin, tu n'as pas de bootloader, et tu veux déjà y rajouter un poussoir
    Envoie plutôt une image de la configuration de MHC de l'appli. Pour vérifier que tu as bien coché ce qu'il fallait.
    Ensuite on pourra regarder le linker script de l'appli, mais quand on sera sur que le bootloader marche et pas avant.

  17. #16
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Citation Envoyé par satinas Voir le message
    Il faut travailler par étape, toi tu commences par la fin, tu n'as pas de bootloader, et tu veux déjà y rajouter un poussoir
    Envoie plutôt une image de la configuration de MHC de l'appli. Pour vérifier que tu as bien coché ce qu'il fallait.
    Ensuite on pourra regarder le linker script de l'appli, mais quand on sera sur que le bootloader marche et pas avant.
    Je suis un peu impatient, et je pensais pouvoir utilisé un fichier que j'avais difficilement réussi à faire fonctionner à l'époque du poste de 2013

    Ok je t'envoi le lien du MHC

    https://www.dropbox.com/s/zdequ2clst...fault.mhc?dl=0

  18. #17
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Je voulais le dump de la configuration MHC de l'appli, pas du bootloader, car c'est elle qui se compile avec des erreurs. Juste une image des coches de la partie librairie bootloader, avec toutes les sous-items apparents.

    Tu veux récupérer un ancien bootloader, tu peux aussi essayer un source de pic 16f84, ça marchera peut être sur pic32
    Dernière modification par satinas ; 24/09/2016 à 21h43.

  19. #18
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Citation Envoyé par satinas Voir le message
    Je voulais le dump de la configuration MHC de l'appli, pas du bootloader, car c'est elle qui se compile avec des erreurs. Juste une image des coches de la partie librairie bootloader, avec toutes les sous-items apparents.
    excuse moi, mais si j'ai bien compris, il me semblait que tu me conseillais de ce concentrer sur le bootloader, c'est pour cette raison que j'ai cru que tu voulais le MHC du bootloader.
    Par contre, qu'entends tu par dump de la conf MHC ?
    Nom : bapp.png
Affichages : 103
Taille : 114,2 Ko


    Citation Envoyé par satinas Voir le message
    Tu veux récupérer un ancien bootloader, tu peux aussi essayer un source de pic 16f84, ça marchera peut être sur pic32
    Bah celui que j'ai fonctionne déjà , je me connecte bien bien avec en usb, en faisant un appuis sur le switch, j'aimerai qu'il fonctionne avec mon appli ... (:
    mais après, si c'est plus judicieux de repartir d'un programme bootloader nouveau pas de problème, c'est partie (:

  20. #19
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Je n'ai rien contre le fait d'utiliser ton ancien bootloader, mais pour le moment le problème c'est de compiler l'application avec un login script modifié pour être bootloadée, et pour y arriver il vaut mieux dans un premier temps utiliser un bootloader Harmony.
    J'ai téléchargé harmony 2.0 et dans la librairie bootloder, on doit aussi cocher USB device dans le projet de l'appli, ça fait une différence par rapport à ta version.
    Ceci dit j'ai rien expérimenté pratiquement, uniquement utilisé le configurateur et compilé sans problème une petite appli et son bootloader.

  21. #20
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Bonjour satinas,

    Dans ma version v1.07 il m'est pas demandé par USB alors que c'est demandé dans le cas d'un bootloader, le version 2.0 doit-être récente car y a peut de temps j'ai téléchargé la 1.08.

  22. #21
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Bonjour,
    Si on suppose que Harmony s'occupe de reloger correctement l'application dans la flash en fonction de la taille du bootloader, il est nécessaire d'indiquer quel type de bootloader tu utilises lors de la compilation du projet appli. Le bootloader série peut se loger dans la boot flash de 12k, pas les autres qui eux se placent en début de flash 512k.
    Installe Harmony 2.0. Tu peux travailler avec les 2 versions de Harmony, on peut paramètre dans chaque projet quelle version utiliser.

  23. #22
    davidif

    Re : prog bootloader sur pic32mx795f512l

    ou vois tu que l'on peut utiliser plusieurs version d'harmony selon le projet, quand j'ai chargé le plugging 1.08, ça a remplacer la 1.07 directement et je ne vois pas dans la propriété du projet un quelconque réglage le concernant.

    Bon d'accord, avec l'age j'ai la vue qui baisse mais c'est pas que ça (:

  24. #23
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Il est conseillé de placer les projets dans le dossier app d'Harmony, donc forcément chaque projet est associé à la version d'Harmony qui le contient. Il te faudra donc dupliquer le projet, par le mhc ? ou par copie ? ou en le recréant.
    Ce que je voulais dire, c'est que plusieurs versions d'Harmony peuvent cohabiter sur les disques durs. Donc tu peux avoir tes 2 projets en ligne dans MpLabx.
    Dernière modification par satinas ; 25/09/2016 à 09h11.

  25. #24
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Lorsque tu crées le projet, tu choisis quelle version d'Harmony utiliser, il place par défaut le projet dans app, tu peux quand même décider de placer ton projet ailleurs. La version d'Harmony ne pourra pas être changée.

  26. #25
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Oui effectivement, à la création il demande le path à utiliser, seulement quand je vais dans plugging download je ne vois que la dernière version d'harmony, faut que je fasse les tests.

    Par contre,j'ai délocalisé mon projet hors du répertoire app pour le classer par projet, alors comme j'ai dû prendre une grande partie du répertoire avec les fichiers framworks et docs c'est assez lourd , environ 800M de fichiers sans compter qu'a chaque évolution de mon soft, j'aime bien incrémenter un nouveau soft pour pouvoir revenir en arrière si problème.

    faut que je vois comment le replacer sans trop chambouler tout mon soft, car la livraison est proche et j'aimerai pas avoir de problèmes maintenant (: car tout est fonctionnelle, j'ai seulement des choses qui sont transparentes pour le clients(bootloader, flash interne, DHCP), choses dont je ferrais une mise à jours dès la production.

  27. #26
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Ouh là là !
    Il n' y pas à installer de plugin, on choisit à la création du projet, la version Harmony dans le champ harmony Path
    Il n'y a rien à copier, le dossier framework reste dans le dossier Harmony, et ne doit pas être modifié.
    Ton projet est un projet Mplabx classique avec quelques fichiers config en plus
    Tout ça à confirmer bien sur.

  28. #27
    davidif

    Re : prog bootloader sur pic32mx795f512l

    J'ai traversé un problème de programmation que j'ai dû résoudre et qui m'amène à me poser une question

    En faite, je ne pouvais plus programmer ma carte, s'est a dire que mon programme fonctionnait bien je pouvais le compiler seulement la fonction de programmation device étaient grisé, j'ai donc tenté de redémarrer mplabx, mais rien n'y a fait, après j'ai repris une ancienne version de mon soft et là le bouton était actif, j'ai donc repris mon ancien programme et fait mes récent rajouts pour pouvoir reprogrammer à nouveau pour que ça fonctionne.

    est-ce que microchip limitterai le nombre de programmation ce qui obligerai d'acheter une licence ? jusqu'à présent j'ai jamais eu à acheter quoi que ce soit sauf évidemment les kits et autre microproc.

  29. #28
    satinas

    Re : prog bootloader sur pic32mx795f512l

    Il faut mettre de l'ordre dans ton soft, et mettre chaque chose à sa place.
    Il est anormal que le configurateur te propose des options bootloader différentes selon le projet. Ce n'est pas une histoire de version de Harmony. Il faut régler ce problème. Tu utilises peut être 2 versions du configurateur.
    Remets tes 2 projets au propre, ou plutôt ton projet appli, car le projet Bootloader est tout neuf, et il est bon.

  30. #29
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Je suis en train de voir pour relocaliser mon appli dans le fichier harmony, seulement c'est pas si simple car j'ai utilisé la demo que j'ai remanier et j'aimerai bien garder la nomination propre de mon projet et non celle de microchip(C:\microchip\harmony \v1_07_01\apps\tcpip\web_serve r_nvm_mpfs\firmware\pic32_eth_ wifi_web_server.X), pour pouvoir faire un classement par projet et je ne peux apparemment pas faire du "enregistré sous" pour éventuellement changer sa nomination sans mettre le bazard

    j'ai du mal à voir comment je pourrai organiser mes softs sans que ça dysfonctionne pour l'instant

  31. #30
    davidif

    Re : prog bootloader sur pic32mx795f512l

    Bon apparemment il y peut être la possibilité de classer mes projet comme je le souhaite hors du dossier harmony tout en gardant les framworks et autres dossier dans le répertoire C:\microchip\harmony\v1_07_01 une sorte "d'enregistré sous"

    j'ouvre donc mon programme demo (celui dont je me suis servit) récupérer à cette emplacement
    C:\microchip\harmony\v1_07_01\ apps\tcpip\web_server_nvm_mpfs \firmware\pic32_eth_wifi_web_s erver.X

    puis je fais un clic droit sur le projet puis "copy" là je redirige le projet ou je souhaite et il fait donc une copy des fichiers

    ce pourrai bien ce finir, mais non évidemment, car je fais donc une compilation de ma copy et là .. BAH il veut pas , pourquoi ?
    Il semblerait qu'il chercherai un dossier "drv_spi_tasks.c" qui est bien présent , donc là comprend pas


    Code:
    make -f nbproject/Makefile-pic32mx_eth_sk+ioexp+11n+freertos.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory 'C:/Users/disque 1t/etude/hardware/20160209 1/software/V1.0/pic32_eth_wifi_web_server'
    make[2]: *** No rule to make target '../../../../../../../../../../../microchip/harmony/v1_07_01/apps/tcpip/web_server_nvm_mpfs/firmware/src/system_config/pic32mx_eth_sk+ioexp+11n+freertos/framework/driver/spi/dynamic/drv_spi_tasks.c', needed by 'build/pic32mx_eth_sk+ioexp+11n+freertos/production/_ext/1708618423/drv_spi_tasks.o'.  Stop.
    make  -f nbproject/Makefile-pic32mx_eth_sk+ioexp+11n+freertos.mk dist/pic32mx_eth_sk+ioexp+11n+freertos/production/pic32_eth_wifi_web_server.production.hex
    make[1]: *** [.build-conf] Error 2
    make[2]: Entering directory 'C:/Users/disque 1t/etude/hardware/20160209 1/software/V1.0/pic32_eth_wifi_web_server'
    make[2]: Leaving directory 'C:/Users/disque 1t/etude/hardware/20160209 1/software/V1.0/pic32_eth_wifi_web_server'
    nbproject/Makefile-pic32mx_eth_sk+ioexp+11n+freertos.mk:78: recipe for target '.build-conf' failed
    make: *** [.build-impl] Error 2
    make[1]: Leaving directory 'C:/Users/disque 1t/etude/hardware/20160209 1/software/V1.0/pic32_eth_wifi_web_server'
    nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
    
    BUILD FAILED (exit value 2, total time: 103ms)

Page 1 sur 2 1 DernièreDernière

Discussions similaires

  1. [Numérique] pic32mx795f512l mémoriser en flash
    Par davidif dans le forum Électronique
    Réponses: 155
    Dernier message: 03/09/2016, 11h01
  2. programmation d'un pic32mx795f512l
    Par davidif dans le forum Électronique
    Réponses: 0
    Dernier message: 24/03/2015, 17h39
  3. programmation d'un pic32mx795f512l
    Par davidif dans le forum Électronique
    Réponses: 22
    Dernier message: 02/03/2015, 14h17
  4. bootloader pic32MX795F512L
    Par davidif dans le forum Électronique
    Réponses: 37
    Dernier message: 06/12/2013, 10h21
  5. TCP/IP sur PIC32MX795F512L
    Par invite3bb6cfa9 dans le forum Électronique
    Réponses: 2
    Dernier message: 13/02/2012, 22h58
Découvrez nos comparatifs produits sur l'informatique et les technologies.