This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Keil 4 to Kiel 5 upgrade

I am rebuilding my computer after experiencing a corrupt boot sector and am reinstalling all my apps.  I am moving from Kiel 4 to Kiel 5.  My project loads, but it says that it needs the ARM Tool chain which is not installed. I installed the Toolchain on WIN 10 and it seemed to install smoothly, however in the Project menu, the Options menu item and those below it are all disabled.  Can you guide me through this? 

I notice in the readme.txt in * Architecture options usage * there is a considerable amount ot config options, is this a necessary requirement for the nRF51422 ?  

Thanks,

Brian Fleming

Parents
  • Hi,

    Please contact Keil support for tool's problem

    http://www.keil.com/support/

     

    I cannot find the readm.txt with that statement.

    Where do you get the readme.txt? Where do you get? 

     

    -Amanda H.

  • Hello here is the readme which popped up after the install.

    GNU Tools for Arm Embedded Processors
    Version: 8
    
    Table of Contents
    * Installing executables on Linux
    * Installing executables on Mac OS X
    * Installing executables on Windows
    * Invoking GCC
    * Architecture options usage
    * C Libraries usage
    * Linker scripts & startup code
    * Samples
    * GDB Server for CMSIS-DAP based hardware debugger
    
    * Installing executables on Linux *
    Unpack the tarball to the install directory, like this:
    $ cd $install_dir && tar xjf gcc-arm-none-eabi-*-yyyymmdd-linux.tar.bz2
    
    If you want to use gdb python build (arm-none-eabi-gdb-py), you'd
    install python2.7.
    
    For some Ubuntu releases, the toolchain can also be installed via
    Launchpad PPA at https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa.
    
    * Installing executables on Mac OS X *
    Unpack the tarball to the install directory, like this:
    $ cd $install_dir && tar xjf gcc-arm-none-eabi-*-yyyymmdd-mac.tar.bz2
    
    * Installing executables on Windows *
    Run the installer (gcc-arm-none-eabi-*-yyyymmdd-win32.exe) and follow the
    instructions. The installer can also be run on the command line. When run on
    the command-line, the following options can be set:
      - /S Run in silent mode
      - /P Adds the installation bin directory to the system PATH
      - /R Adds an InstallFolder registry entry for the install.
    
    For example, to install the tools silently, amend users PATH and add registry
    entry:
    > gcc-arm-none-eabi-*-yyyymmdd-win32.exe /S /P /R
    
    The toolchain in windows zip package is a backup to windows installer for
    those who cannot run installer.  We need decompress the zip package
    in a proper place and then invoke it following instructions in next section.
    
    To use gdb python build (arm-none-eabi-gdb-py), you need install 32 bit
    python2.7 no matter 32 or 64 bit Windows. Please get the package from
    https://www.python.org/download/.
    
    * Invoking GCC *
    On Linux and Mac OS X, either invoke with the complete path like this:
    $ $install_dir/gcc-arm-none-eabi-*/bin/arm-none-eabi-gcc
    
    Or set path like this:
    $ export PATH=$PATH:$install_dir/gcc-arm-none-eabi-*/bin
    $ arm-none-eabi-gcc
    
    On Windows (although the above approaches also work), it can be more
    convenient to either have the installer register environment variables, or run
    INSTALL_DIR\bin\gccvar.bat to set environment variables for the current cmd.
    
    For windows zip package, after decompression we can invoke toolchain either with
    complete path like this:
    TOOLCHAIN_UNZIP_DIR\bin\arm-none-eabi-gcc
    or run TOOLCHAIN_UNZIP_DIR\bin\gccvar.bat to set environment variables for the
    current cmd.
    
    * Architecture options usage *
    
    This toolchain is built and optimized for Cortex-A/R/M bare metal development.
    the following table shows how to invoke GCC/G++ with correct command line
    options for variants of Cortex-A/R and Cortex-M architectures.
    
    --------------------------------------------------------------------------
    | Arm core   | Command Line Options                       | multilib     |
    |------------|--------------------------------------------|--------------|
    | Cortex-M0+ | -mthumb -mcpu=cortex-m0plus                | thumb        |
    | Cortex-M0  | -mthumb -mcpu=cortex-m0                    | /v6-m        |
    | Cortex-M1  | -mthumb -mcpu=cortex-m1                    |              |
    |            |--------------------------------------------|              |
    |            | -mthumb -march=armv6-m                     |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M3  | -mthumb -mcpu=cortex-m3                    | thumb        |
    |            |--------------------------------------------| /v7-m        |
    |            | -mthumb -march=armv7-m                     |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M4  | -mthumb -mcpu=cortex-m4                    | thumb        |
    | (No FP)    |--------------------------------------------| /v7e-m       |
    |            | -mthumb -march=armv7e-m                    |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M4  | -mthumb -mcpu=cortex-m4 -mfloat-abi=softfp | thumb        |
    | (Soft FP)  | -mfpu=fpv4-sp-d16                          | /v7e-m       |
    |            |--------------------------------------------| /fpv4-sp     |
    |            | -mthumb -march=armv7e-m -mfloat-abi=softfp | /softfp      |
    |            | -mfpu=fpv4-sp-d16                          |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M4  | -mthumb -mcpu=cortex-m4 -mfloat-abi=hard   | thumb        |
    | (Hard FP)  | -mfpu=fpv4-sp-d16                          | /v7e-m       |
    |            |--------------------------------------------| /fpv4-sp     |
    |            | -mthumb -march=armv7e-m -mfloat-abi=hard   | /hard        |
    |            | -mfpu=fpv4-sp-d16                          |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M7  | -mthumb -mcpu=cortex-m7                    | thumb        |
    | (No FP)    |--------------------------------------------| /v7e-m       |
    |            | -mthumb -march=armv7e-m                    |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M7  | -mthumb -mcpu=cortex-m7 -mfloat-abi=softfp | thumb        |
    | (Soft FP)  | -mfpu=fpv5-sp-d16                          | /v7e-m       |
    |            |--------------------------------------------| /fpv4-sp     |
    |            | -mthumb -march=armv7e-m -mfloat-abi=softfp | /softfp      |
    |            | -mfpu=fpv5-sp-d16                          |              |
    |            |--------------------------------------------|--------------|
    |            | -mthumb -mcpu=cortex-m7 -mfloat-abi=softfp | thumb        |
    |            | -mfpu=fpv5-d16                             | /v7e-m       |
    |            |--------------------------------------------| /fpv5        |
    |            | -mthumb -march=armv7e-m -mfloat-abi=softfp | /softfp      |
    |            | -mfpu=fpv5-d16                             |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M7  | -mthumb -mcpu=cortex-m7 -mfloat-abi=hard   | thumb        |
    | (Hard FP)  | -mfpu=fpv5-sp-d16                          | /v7e-m       |
    |            |--------------------------------------------| /fpv4-sp     |
    |            | -mthumb -march=armv7e-m -mfloat-abi=hard   | /hard        |
    |            | -mfpu=fpv5-sp-d16                          |              |
    |            |--------------------------------------------|--------------|
    |            | -mthumb -mcpu=cortex-m7 -mfloat-abi=hard   | thumb        |
    |            | -mfpu=fpv5-d16                             | /v7e-m       |
    |            |--------------------------------------------| /fpv5        |
    |            | -mthumb -march=armv7e-m -mfloat-abi=hard   | /hard        |
    |            | -mfpu=fpv5-d16                             |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M23 | -mthumb -mcpu=cortex-m23                   | thumb        |
    |            |--------------------------------------------| /v8-m.base   |
    |            | -mthumb -march=armv8-m.base                |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M33 | -mthumb -mcpu=cortex-m33                   | thumb        |
    |  (No FP)   |--------------------------------------------| /v8-m.main   |
    |            | -mthumb -march=armv8-m.main                |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-M33 | -mthumb -mcpu-cortex-m33                   | thumb        |
    | (Soft FP)  | -mfloat-abi=softfp -mfpu=fpv5-sp-d16       | /v8-m.main   |
    |            |--------------------------------------------| /fpv5-sp     |
    |            | -mthumb -march=armv8-m.main                | /softfp      |
    |            | -mfloat-abi=softfp -mfpu=fpv5-sp-d16       |              |
    |            |--------------------------------------------|--------------|
    |            | -mthumb -march=armv8-m.main                | thumb        |
    |            | -mfloat-abi=softfp -mfpu=fpv5-d16          | /v8-m.main   |
    |            |                                            | /fpv5        |
    |            |                                            | /softfp      |
    |------------|--------------------------------------------|--------------|
    | Cortex-M33 | -mthumb -mcpu=cortex-m33                   | thumb        |
    | (Hard FP)  | -mfloat-abi=hard -mfpu=fpv5-sp-d16         | /v8-m.main   |
    |            |--------------------------------------------| /fpv5-sp     |
    |            | -mthumb -march=armv8-m.main                | /hard        |
    |            | -mfloat-abi=hard -mfpu=fpv5-sp-d16         |              |
    |            |--------------------------------------------|--------------|
    |            | -mthumb -march=armv8-m.main                | thumb        |
    |            | -mfloat-abi=hard -mfpu=fpv5-d16            | /v8-m.main   |
    |            |                                            | /fpv5        |
    |            |                                            | /hard        |
    |------------|--------------------------------------------|--------------|
    | Cortex-R4  | [-mthumb] -march=armv7-r                   | thumb        |
    | Cortex-R5  |                                            | /v7-ar       |
    | Cortex-R7  |                                            |              |
    | Cortex-R8  |                                            |              |
    | (No FP)    |                                            |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-R4  | [-mthumb] -march=armv7-r -mfloat-abi=softfp| thumb        |
    | Cortex-R5  | -mfpu=vfpv3-d16                            | /v7-ar       |
    | Cortex-R7  |                                            | /fpv3        |
    | Cortex-R8  |                                            | /softfp      |
    | (Soft FP)  |                                            |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-R4  | [-mthumb] -march=armv7-r -mfloat-abi=hard  | thumb        |
    | Cortex-R5  | -mfpu=vfpv3-d16                            | /v7-ar       |
    | Cortex-R7  |                                            | /fpv3        |
    | Cortex-R8  |                                            | /hard        |
    | (Hard FP)  |                                            |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-R52 | [-mthumb] -mcpu=cortex-r52                 | thumb        |
    | (No FP)    |--------------------------------------------| /v7-ar       |
    |            | [-mthumb] -march=armv8-r+crc               |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-R52 | [-mthumb] -mcpu=cortex-r52                 | thumb        |
    | (Soft FP)  | -mfloat-abi=softfp -mfpu=neon-fp-armv8     | /v7-ar       |
    |            |--------------------------------------------| /fpv3        |
    |            | [-mthumb] -march=armv8-r+crc               | /softfp      |
    |            | -mfloat-abi=hard -mfpu=neon-fp-armv8       |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-R52 | [-mthumb] -mcpu=cortex-r52                 | thumb        |
    | (Hard FP)  | -mfloat-abi=hard -mfpu=neon-fp-armv8       | /v7-ar       |
    |            |--------------------------------------------| /fpv3        |
    |            | [-mthumb] -march=armv8-r+crc               | /hard        |
    |            | -mfloat-abi=hard -mfpu=neon-fp-armv8       |              |
    |------------|--------------------------------------------|--------------|
    | Cortex-A*  | [-mthumb] -march=armv7-a                   | thumb        |
    | (No FP)    |                                            | /v7-ar       |
    |------------|--------------------------------------------|--------------|
    | Cortex-A*  | [-mthumb] -march=armv7-a -mfloat-abi=softfp| thumb        |
    | (Soft FP)  | -mfpu=vfpv3-d16                            | /v7-ar       |
    |            |                                            | /fpv3        |
    |            |                                            | /softfp      |
    |------------|--------------------------------------------|--------------|
    | Cortex-A*  | [-mthumb] -march=armv7-a -mfloat-abi=hard  | thumb        |
    | (Hard FP)  | -mfpu=vfpv3-d16                            | /v7-ar       |
    |            |                                            | /fpv3        |
    |            |                                            | /hard        |
    --------------------------------------------------------------------------
    
    * C Libraries usage *
    
    This toolchain is released with two prebuilt C libraries based on newlib:
    one is the standard newlib and the other is newlib-nano for code size.
    To distinguish them, we rename the size optimized libraries as:
    
      libc.a --> libc_nano.a
      libg.a --> libg_nano.a
    
    To use newlib-nano, users should provide additional gcc compile and link time
    option:
     --specs=nano.specs
    
    At compile time, a 'newlib.h' header file especially configured for newlib-nano
    will be used if --specs=nano.specs is passed to the compiler.
    
    Nano.specs also handles two additional gcc libraries: libstdc++_nano.a and
    libsupc++_nano.a, which are optimized for code size.
    
    For example:
    $ arm-none-eabi-gcc src.c --specs=nano.specs $(OTHER_OPTIONS)
    
    This option can also work together with other specs options like
    --specs=rdimon.specs
    
    Please note that --specs=nano.specs is a both a compiler and linker option.  Be
    sure to include in both compiler and linker options if compiling and linking
    are separated.
    
    ** additional newlib-nano libraries usage
    
    Newlib-nano is different from newlib in addition to the libraries' name.
    Formatted input/output of floating-point number are implemented as weak symbol.
    If you want to use %f, you have to pull in the symbol by explicitly specifying
    "-u" command option.
    
      -u _scanf_float
      -u _printf_float
    
    e.g. to output a float, the command line is like:
    $ arm-none-eabi-gcc --specs=nano.specs -u _printf_float $(OTHER_LINK_OPTIONS)
    
    For more about the difference and usage, please refer the README.nano in the
    source package.
    
    Users can choose to use or not use semihosting by following instructions.
    ** semihosting
    If you need semihosting, linking like:
    $ arm-none-eabi-gcc --specs=rdimon.specs $(OTHER_LINK_OPTIONS)
    
    ** non-semihosting/retarget
    If you are using retarget, linking like:
    $ arm-none-eabi-gcc --specs=nosys.specs $(OTHER_LINK_OPTIONS)
    
    * Linker scripts & startup code *
    
    Latest update of linker scripts template and startup code is available on
    https://developer.arm.com/embedded/cmsis
    
    * Samples *
    Examples of all above usages are available at:
    $install_dir/gcc-arm-none-eabi-*/share/gcc-arm-none-eabi/samples
    
    Read readme.txt under it for further information.
    
    * GDB Server for CMSIS-DAP based hardware debugger *
    CMSIS-DAP is the interface firmware for a Debug Unit that connects
    the Debug Port to USB.  More detailed information can be found at
    http://www.keil.com/support/man/docs/dapdebug/.
    
    A software GDB server is required for GDB to communicate with CMSIS-DAP based
    hardware debugger.  The pyOCD is an implementation of such GDB server that is
    written in Python and under Apache License.
    
    For those who are using this toolchain and have board with CMSIS-DAP based
    debugger, the pyOCD is our recommended gdb server.  More information can be
    found at https://github.com/mbedmicro/pyOCD.
    

  • I have the example program compiling now, but the soft device has problems.  More to come.

  • Here is where I am at this moment, the problem is compiling the soft device.

    Here is where I am at with nRF5_SDK_12.3.0_D7731ad.
    
    Rebuild all target modules:
    
    ".\_build\nrf51422_xxac.axf" - 0 Error(s), 0 Warning(s).
    
    
    Rebuild all target files for soft device:
    
    Rebuild started: Project: ble_app_uart_pca10028_s130
    *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Rebuild target 'flash_s130_nrf51_2.0.1_softdevice'
    compiling main.c...
    C:\Keil_v5\ARM\BIN\nrf.h(64): error:  #5: cannot open source input file "nrf51_deprecated.h": No such file or directory
              #include "nrf51_deprecated.h"
    ..\..\..\main.c: 0 warnings, 1 error
    "..\..\..\..\..\..\components\softdevice\s130\hex\s130_nrf51_2.0.1_softdevice.hex" - 1 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:01
    
    
    If I use the nRF5_SDK_15.0.0_a53641a, it only supports the nrf52832.
    Rebuild all target modules:
    
    	".\_build\nrf52832_xxaa.axf" - 0 Error(s), 0 Warning(s).
    
    
    Rebuild the soft device:
          	#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
    
    Important question, is the nRF5_SDK_15.0.0_a53641a compatable with the nRF51 Development Kit?
    
    At this point the holdup is the Soft Device, it will not compile either with the newly downloaded SDK or with the older version which I was using previously.
    
    Thanks for your support!

  • Hi Brian, 

    Please refer to Compiling the application and select the target as nrf51422_xxac.

     >>Important question, is the nRF5_SDK_15.0.0_a53641a compatable with the nRF51 Development Kit?

    No, please refer to nRF5 SDK v15.0.0 SDK Release Notes:

    Supported boards:
    - PCA10040
    - PCA10040E (nRF52810 emulation on PCA10040)
    - PCA10056
    - PCA10059 (support in selected examples)
    - Dynastream's D52DK1 (only for ANT examples)

     

    -Amanda H. 

  • Thanks again, here is an update.

    The only way I can select the nRF51422 is by selecting the original SDK   nRF5_SDK_12.3.0_D7731ad  so that is what I will use.  I was using it before on my old hard drive with no problems.
    
    If I rebuild all target files for my example app, ble_app_uart_pc it compiles with no error.
    
    If I attempt to rebuild the soft device, ble_app_uart_pca10028_s130, I get the following error:
    
    C:\Keil_v5\ARM\BIN\nrf.h(64): error:  #5: cannot open source input file "nrf51_deprecated.h": No such file or directory
    
    I can not find that file anywhere on my new or old hard drive.  We nees to get the soft device compiling.
    
    Also whenever I open Keil 5, I get an error message:
    
    The project references devices, files or libraries that are not installed. Download and install:
     Third party device support for Nordic Semiconductor nRF51422_xxAC (device not included in legacy database)
    I can not seem to resolve the above error.
    
    Thanks as always for your expert support!

  • Hi Brian, 

    "nrf51_deprecated.h" is located under <nRF5_SDK_12.3.0>\components\device. 

    For the Keil5 warning message, please see this answer: devzone.nordicsemi.com/.../

    You are trying to open up a Keil 4 project in Keil 5, and then it looks in the Legacy Device Database for the target. For some reason, the xxAC chip is missing in this database. However, you should be able to just ignore the warning message. The project should compile just fine. You can also open the Keil 5 project in the arm5_no_packs folder, and the warning message should go away.

     

    -Amanda H.

Reply Children
  • Slowly making progress, but I am stuck on ble_12cap.h which all my searches can not find.

    Instead of copying files, I have tried the modifying the Include path in C/C++ and it does not seem to help

    ..\..\..\config\ble_app_uart_pca10028_s130;..\..\..\config;..\config;C:\Keil_v5\ARM\BIN\;C:\Keil_v5\ARM\components\ble

  • I have been copying the missing files into: C:\Keil_v5\ARM\BIN\ when I do so it compiles until it finds the next missing file.

  • Hello.  I have not made any real progress because I feel I have made some terrible mistake which is causing the difficulties I am experiencing, therefore I think I should have a fresh look at my problem.
    Previously I was using the Keil 4, the nRF5_SDK_12.3.0_D7731ad SDK and the nRF51 Development Kit with the on board nRF51422, and it was working perfectly.
    Due to a computer hardware issue, I need to use Kiel 5 with the nRF51 Development Kit which I was using previously.
    Can you supply me with a link to the correct SDK which I can use with Keil 5 and the nRF51 Development Kit? 
    It is very important that the SDK has an example for the ble_app_uart like what is in the nRF5_SDK_12.3.0_D7731ad.
  • Hi Brian,

     

    The project is under nRF5_SDK_12.3.0_d7731ad\examples\ble_peripheral\ble_app_uart\pca10028\s130\arm5_no_packs

    Could you try that?

    arm4 is for Keil 4. 

    -Amanda H.

  • Thanks as always!

    Ok, the ble_app_uart_pca10028_s130 (actually the whole project) is compiling with no errors when loaded from the folder you suggested!  Thanks!

    Now the soft device.  Can you tell me which soft device I should be using?  nRF51422_xxAA the AB or the AC version.

    This is the device listed in the dropdown. flash_s130_nrf51_2.0.1_softdevice.

    I have tried all three versions and they all compile with the same error.

    *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    compiling main.c...
    ..\..\..\main.c(54): error:  #5: cannot open source input file "nordic_common.h": No such file or directory
      #include "nordic_common.h"
    ..\..\..\main.c: 0 warnings, 1 error
    "..\..\..\main.c" - 1 Error(s), 0 Warning(s).

    A windows explorer search does show that the nordic_common.h  does exist in the 'C:\Keil_v5\ARM\ARMCC\Bin' folder.

    Thank-you for your continuing support!

Related