Hot!BSP Variables

Author
Vargoth
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/26 17:18:02
  • Location: 0
  • Status: offline
2018/09/23 14:19:09 (permalink)
0

BSP Variables

I am trying to create my own BSP. I have it setup and I am able to select the BSP in MHC with everything in my file populating properly based on one of the example BSPs. However, I am trying to enable settings that I haven't seen the other BSPs do. So my question is, how do you know the variable names that need set to enable certain functions?
 
For instance, based on an existed BSP example the following lines enable the "memory system service", selects DDR as the memory type, sets it to internal, and enables the ODT write:
set USE_SYS_MEMORY to y if USE_DRV_GFX_GLCD_NEEDED
set USE_SYS_MEMORY_DDR to y if USE_DRV_GFX_GLCD_NEEDED
set SYS_MEMORY_DDR_TYPE to "Internal" if USE_DRV_GFX_GLCD_NEEDED
set SYS_MEMORY_DDR_ODT_WRITE_ENABLE to y if USE_DRV_GFX_GLCD_NEEDED
 
USE_SYS_MEMORY is the checkbox for the Memory System Service. Where can I find definitions of the variable names for all of the other options (Graphics stack, I2C, etc.) in the MHC? 
 
Thank you!
Patrick
#1

3 Replies Related Threads

    Paul PortSol
    Super Member
    • Total Posts : 400
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: 0
    • Status: offline
    Re: BSP Variables 2018/09/24 06:59:44 (permalink)
    0
    What version of Harmony are you using?
    If using HarmonyV2.xx then I personally recommend you don't use BSP.
    Instead use the pin manager tools in MHC to configure your pins.
    It is much easier and cleaner going forward.
    BSP is agony.
    If using Harmony V1.XX you'll have to mess with BSP.
    Paul
    #2
    Vargoth
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2018/02/26 17:18:02
    • Location: 0
    • Status: offline
    Re: BSP Variables 2018/09/24 10:43:00 (permalink)
    0
    Paul,
     
    I am using 2.06. I would tend to agree with you and I have tried to do it without a BSP. However, for some reason if I deselect the BSP and just manually toggle all of the options that the BSP selects, the code that I am using doesn't work. I am running a 800*480 LCD with the Harmony Graphics Stack and the program never gets through the initializations without the BSP.
     
    The options that the BSP selects (LCD, GLCD, and DDR Settings) are all easy to find in MHC and I have verified them several times when not using a BSP so I believe that there is something going on behind the scenes that I don't know about. With the BSP, everything works flawlessly (for a Harmony project)...
     
    Thank you!
    Patrick
    #3
    Paul PortSol
    Super Member
    • Total Posts : 400
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: 0
    • Status: offline
    Re: BSP Variables 2018/09/25 05:23:21 (permalink)
    0
    Oh don't do that.
    Start with a fresh project, and enable only what you need. 
    If you need to experiment with code from BSP or from sample code under MHC-Apps-GenerateAppCode then do in a separate test project, then copy over only what you need.
     
    I've seen that there is some "automatic enabling" by BSP and by the MHC-Apps-GenerateAppCode. 
    Best to find out what is really happening else it will come back to haunt you.
     
    I use "Beyond Compare" to compare my working project versus experimental projects to see what MHC has done to code and config files, it allows comparing whole project trees (though folders need to be same names if you don't want to step through them).  Doing this can be useful (I installed harmony on P: for cleaner backups):
    - P:\microchip\harmony\v2_06\apps = Microchip sample projects
    - P:\microchip\harmony\v2_06\mine = My own projects
    - P:\microchip\harmony\v2_06\mineA  (\mineB...) = copies of my own projects, but with other things enabled for experiments, such as BSP or MHC-Apps-Generate... (allows keeping same project names for Beyond Compare)
     
    I recommend setting these as Ready Only in Harmony to prevent mistaken changes during editing:
    - _HarmonyReadonly=framework, bsp, third_party, bin(libs)
     
    Notes from a previous post:
    - MHC_CreatingProjectWithoutBSP_v00PR.txt
     
    Paul
     
     
     
     
     
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5