Cannot change register def file to relative path

Sysprogs forums Forums VisualGDB Cannot change register def file to relative path

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8731
    CurtisHx
    Participant

    Is there a way to change the Peripheral register definition file to a relative path?  It keeps getting prefixed with “C:\SysGCC\arm-eabi\”, and that’s not where I want to store the peripheral register definition file.

    #8733
    support
    Keymaster

    Hi,

    Yes, if your embedded profile contains the <BSPSubdirectory> element (e.g. set to just “BSP”), the relative path for the peripheral register definition will be evaluated against the $(ProjectDir)\BSP.

    #8763
    CurtisHx
    Participant

    Is there any way to set it relative to the project path?  We have all files checked into source control (TFS), and developers will have different local folders.

    #8766
    support
    Keymaster

    Hi,

    Sorry for confusion. If you set the BSPSubdirectory field as described above, it will be using relative paths, e.g.

    <BSPSubdirectory>BSP</BSPSubdirectory>...<MCUDefinitionFile>test.xml</MCUDefinitionFile>

    Then VisualGDB will automatically use the <Project Directory>\BSP\test.xml path.

    If you need a more specific example, we would recommend creating a normal BSP-based project, converting it to a stand-alone one and having a quick look into the generated mcu.xml file. It will not have any absolute paths hardcoded.

    #8771
    CurtisHx
    Participant

    This project has been a stand alone project for quite a while.  There are <MCUDefinitionFile> tags in the MCU.xml file, but no <BSPSubdirectory> tags.

    Also, changing the peripheral register definition file will change where Make looks for the compiler.  For example, I changed the file location from “C:\SysGCC\arm-eabi\nRF52.xml” to “C:\SysGCC\arm-eabi\nRF5x\DeviceDefinitions\nRF52.xml”, and Make could no longer find the GCC C++ compiler.

    #8824
    support
    Keymaster

    Hi,

    It’s hard to say why the project has no BSPSubdirectory tag, but adding it should solve the problem.

    The MCUDefinition location should not be related to the compiler location. Perhaps you have changed the toolchain location instead?

    #8890
    CurtisHx
    Participant

    Alright.  I am having absolutely no luck with this whatsoever.  Here’s my folder structure:

    Nordic
       nRF52
          Project
             MCU.xml
       SDK
         nRF5_SDK_11.0.0
            Device
               nRF52.xml

    How can I force the Peripheral register definition file location in the VisualGDB Project Properties Page to read “..\..\SDK\nRF5\SDK\11.0.0\Device\nRF52.xml”?  Because every time I try to change it, I keep getting an absolute path.  It cannot be an absolute path because other developers locate their sources in different locations.  It must be a relative path.

    Here’s the MCU.xml file.  What do I need to change?

    <?xml version="1.0"?>
    <EmbeddedProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <ToolchainID>com.visualgdb.arm-eabi</ToolchainID>
     <BspID>com.visualgdb.bsp.in-place</BspID>
     <BspVersion>1.0</BspVersion>
     <BSPSubdirectory>..\..\SDK\nRF5_SDK_11.0.0\</BSPSubdirectory>
     <MCUDefinitionFile>\device\nRF52.xml</MCUDefinitionFile>
     <McuID>nRF52832_XXAA</McuID>
     <MCUProperties>
     <Entries />
     </MCUProperties>
     <BSPSourceFolderName>Device-specific files</BSPSourceFolderName>
     <InPlaceMCU>
     <ID>nRF52832_XXAA</ID>
     <UserFriendlyName>nRF52832_XXAA</UserFriendlyName>
     <CompilationFlags>
     <PreprocessorMacros>
     <string>$$com.sysprogs.bspoptions.nrf5x.defmak$$</string>
     <string>nosoftdev</string>
     <string>ARM_MATH_CM4</string>
     </PreprocessorMacros>
     <IncludeDirectories>
     <string>.</string>
     </IncludeDirectories>
     <AdditionalLibraryDirectories>
     <string>$$SYS:BSP_ROOT$$/nRF5x/SoftdeviceLibraries</string>
     </AdditionalLibraryDirectories>
     <AdditionalLibraries>
     <string>compactcpp</string>
     </AdditionalLibraries>
     <CFLAGS />
     <CXXFLAGS />
     <LDFLAGS />
     <ASFLAGS>-mfpu=fpv4-sp-d16</ASFLAGS>
     <LinkerScript>nRF52832_XXAA_nosoftdev.lds</LinkerScript>
     <COMMONFLAGS>-mabi=aapcs $$com.sysprogs.bspoptions.nrf5x.floatsoft$$ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard</COMMONFLAGS>
     <EnableLinkerGroups>true</EnableLinkerGroups>
     </CompilationFlags>
     <AdditionalSourceFiles />
     <AdditionalHeaderFiles />
     <AdditionalSystemVars>
     <SysVarEntry>
     <Key>com.sysprogs.bspoptions.nrf5x.defmak</Key>
     <Value>NRF52</Value>
     </SysVarEntry>
     <SysVarEntry>
     <Key>com.sysprogs.bspoptions.nrf5x.floatsoft</Key>
     <Value />
     </SysVarEntry>
     <SysVarEntry>
     <Key>com.sysprogs.bspoptions.nrf5x.typsf</Key>
     <Value>NRF52</Value>
     </SysVarEntry>
     <SysVarEntry>
     <Key>com.sysprogs.nordic.default_config_suffix</Key>
     <Value>s132_pca10036</Value>
     </SysVarEntry>
     </AdditionalSystemVars>
     <ConfigurableProperties>
     <PropertyGroups>
     <PropertyGroup>
     <Properties>
     <PropertyEntry xsi:type="Boolean">
     <Name>Softdevice firmware is programmed separately</Name>
     <UniqueID>com.sysprogs.bspoptions.nrf5x.softdevice_suffix</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <DefaultValue>false</DefaultValue>
     <ValueForTrue>_reserve</ValueForTrue>
     </PropertyEntry>
     <PropertyEntry xsi:type="Enumerated">
     <Name>Execute from</Name>
     <UniqueID>com.sysprogs.bspoptions.primary_memory</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <SuggestionList>
     <Suggestion>
     <UserFriendlyName>FLASH</UserFriendlyName>
     <InternalValue>flash</InternalValue>
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>SRAM</UserFriendlyName>
     <InternalValue>sram</InternalValue>
     </Suggestion>
     </SuggestionList>
     <DefaultEntryIndex>0</DefaultEntryIndex>
     <AllowFreeEntry>false</AllowFreeEntry>
     </PropertyEntry>
     <PropertyEntry xsi:type="Enumerated">
     <Name>Floating point support</Name>
     <UniqueID>com.sysprogs.bspoptions.arm.floatmode</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <SuggestionList>
     <Suggestion>
     <UserFriendlyName>Software</UserFriendlyName>
     <InternalValue>-mfloat-abi=soft</InternalValue>
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>Hardware (required when using a softdevice)</UserFriendlyName>
     <InternalValue>-mfloat-abi=hard</InternalValue>
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>Unspecified</UserFriendlyName>
     <InternalValue />
     </Suggestion>
     </SuggestionList>
     <DefaultEntryIndex>1</DefaultEntryIndex>
     <AllowFreeEntry>false</AllowFreeEntry>
     </PropertyEntry>
     <PropertyEntry xsi:type="Enumerated">
     <Name>RAM size</Name>
     <UniqueID>com.sysprogs.bspoptions.nrf5x.ramsuffix</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <SuggestionList>
     <Suggestion>
     <UserFriendlyName>32 KB (Preview)</UserFriendlyName>
     <InternalValue>_32k</InternalValue>
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>64 KB (Final)</UserFriendlyName>
     <InternalValue>_64k</InternalValue>
     </Suggestion>
     </SuggestionList>
     <DefaultEntryIndex>0</DefaultEntryIndex>
     <AllowFreeEntry>false</AllowFreeEntry>
     </PropertyEntry>
     <PropertyEntry xsi:type="Enumerated">
     <Name>Softdevice</Name>
     <UniqueID>com.sysprogs.bspoptions.nrf5x.softdevice</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <SuggestionList>
     <Suggestion>
     <UserFriendlyName>None</UserFriendlyName>
     <InternalValue>nosoftdev</InternalValue>
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>S132 (Bluetooth LE)</UserFriendlyName>
     <InternalValue>S132</InternalValue>
     </Suggestion>
     </SuggestionList>
     <DefaultEntryIndex>1</DefaultEntryIndex>
     <AllowFreeEntry>false</AllowFreeEntry>
     </PropertyEntry>
     <PropertyEntry xsi:type="Enumerated">
     <Name>C Library Type</Name>
     <UniqueID>com.sysprogs.toolchainoptions.arm.libctype</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <SuggestionList>
     <Suggestion>
     <UserFriendlyName>Default</UserFriendlyName>
     <InternalValue />
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>Newlib-nano</UserFriendlyName>
     <InternalValue>--specs=nano.specs</InternalValue>
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>Newlib-nano with floating point support in printf()</UserFriendlyName>
     <InternalValue>--specs=nano.specs -u _printf_float</InternalValue>
     </Suggestion>
     <Suggestion>
     <UserFriendlyName>Newlib-nano with floating point support in printf() and scanf()</UserFriendlyName>
     <InternalValue>--specs=nano.specs -u _printf_float -u _scanf_float</InternalValue>
     </Suggestion>
     </SuggestionList>
     <DefaultEntryIndex>0</DefaultEntryIndex>
     <AllowFreeEntry>false</AllowFreeEntry>
     </PropertyEntry>
     <PropertyEntry xsi:type="Boolean">
     <Name>Reduce the size of C++ binaries</Name>
     <UniqueID>com.sysprogs.toolchainoptions.arm.compactcpp</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <DefaultValue>true</DefaultValue>
     <ValueForTrue>compactcpp</ValueForTrue>
     </PropertyEntry>
     <PropertyEntry xsi:type="Boolean">
     <Name>Provide default stubs for system calls</Name>
     <UniqueID>com.sysprogs.toolchainoptions.arm.libnosys</UniqueID>
     <OmitPrefixIfEmpty>false</OmitPrefixIfEmpty>
     <DefaultValue>false</DefaultValue>
     <ValueForTrue>--specs=nosys.specs</ValueForTrue>
     </PropertyEntry>
     </Properties>
     <CollapsedByDefault>false</CollapsedByDefault>
     </PropertyGroup>
     </PropertyGroups>
     </ConfigurableProperties>
     <HierarchicalPath>nRF5x\nRF5Xxxxx</HierarchicalPath>
     <FamilyID>nRF5Xxxxx</FamilyID>
     <FLASHSize>524288</FLASHSize>
     <RAMSize>32768</RAMSize>
     <FLASHBase>0</FLASHBase>
     <RAMBase>536870912</RAMBase>
     <AdditionalSourcesRequiredForTesting>false</AdditionalSourcesRequiredForTesting>
     </InPlaceMCU>
     <MCUMakFile>mcu.mak</MCUMakFile>
     <FrameworkProperties>
     <Entries />
     </FrameworkProperties>
     <TestFrameworkProperties>
     <Entries />
     </TestFrameworkProperties>
    </EmbeddedProfile>
    #8896
    support
    Keymaster

    Hi,

    Looks like you have a typo in the MCUDefinitionFile element:

     <MCUDefinitionFile>\device\nRF52.xml</MCUDefinitionFile>

    According to Windows path syntax, this actually means X:\device\nRF52.xml, where X: is the drive letter of the project directory. Please try changing it to this:

     <MCUDefinitionFile>device\nRF52.xml</MCUDefinitionFile>
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.