This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil uvision-4 source file not found with gnu-arm-gcc

When I try compile my software, I have the following error :

arm-none-eabi-gcc: error: ..srckernelmutex.c: No such file or directory

There is no backslash in the path, normally is ..\src\kernel\mutex.c

why ? anyone can help me ?

Parents Reply Children
  • Hi Per,

    I just create a target and a group under uvision, add existing files to group. My files are not at the root of my project folder (uvision project file here) but in sub folder.
    To resume, if my source files are all in the root of the project, all it is fine but if I place files in a sub folder I have this issue for the those files.
    It's like uvision want me to place all my files in the same folder where the uvision project is created and not elsewhere.
    I hope it is more clear, I have a limited english ;-)

  • OK - so in this case it is uvision itself that produces the path strings. Then you don't have much options. Some possible routes
    - move the source files to the project root directory
    - find a build of the gcc tool chain that has additional code for MS-DOS path separators (\) - I think some cygwin builds of the toolchain do add support for both / and \.
    - consider building the project using a hand-fixed makefile or script.
    - write a shell program/script that picks up the parameters from uvision and translates them before calling the compiler toolchain
    - switch to an IDE that is interacting well with the compiler toolchain.

  • Hi Per,

    When I try to compile directly by calling arm-none-eabi-gcc and give it the C file with slashes or backslashes it's fine. But when I try with uvision, I have the issue, it seems like uvision remove separator (slashes or backslashes) before calling gcc. I don't understand why ? I try code sourcery tools who are describe by keil to be comptatible with uvision. I followed keil's guide to install and I have always the same problem. My version of uvision is 4.72.1.0

  • At least other versions of uvision have correctly handled source files in sub directories - and with "correctly" I mean using \ which is the native path separator in Windows.

    But note that a unix program that receives a path with \ and then tries to print it is likely to drop the \ in the printout - this because the \ has special meaning when the text string is printed. It is, after all, specified in the C language standard as a break character intended to inform that the following character should be treated specially.

    So most likely, the tool is "correctly" called with a path containing \. It then fails to make use of subdirectories because it expects / as path separator. And it then finally prints an error message and that print strips the \ making you see all the elements of the path merged together as a single name.

  • Indeed.

    Why do you particularly want to use uVision?

  • Hi Andrew,

    Because I bought a Keil's evaluation board (MCB4357) and keil's tools are designed for this board, moreover, I can simulate my software without hardware.
    I don't want to use real view and I want to keep GCC.
    But now, I'm return to linux :-) and I use GCC to compile and my JLink edu to debug. All work like a charm.
    But if you have an idea to use uvision 4 with gcc, your are welcome !!!
    This issue is strange and I don't understand why ? Keil said they are compatible with code sourcery tools, I installed it and I have always the same issue.

  • So have you then taken the logical step of asking Keil what they mean with "compatible" if Keil generates path information that the code sourcery tools can't process?

  • Hi Per,

    I use the MDK-lite version witch not include support from Keil.

    3. SUPPORT AND MAINTENANCE.
    If you purchased the Software directly from ARM, and you are not receiving it as either or both, as applicable, Evaluation Software (defined in Clause 2) and Academic Software (defined in Clause 2), you are entitled to reasonable support and maintenance for the Software, for the shorter period of; (i) the term of your licence to the Software (as specified by the Licence Key); and (ii) one (1) year, commencing on the date of purchase.

  • So hey will not like to spend lots of time helping you with issues using the tools. But they might still want to make sure that their documentation is correct - i.e. if they claim the tools should work well with gcc, then they either have a bug or there must be some nice switch somewhere that needs to be set to get the tools to produce compatible command line options.

    In short - it is meaningful to contact them and question their claim about compatibility. Or you can pretend to be a customer and ask them exactly what gcc tool you would need to use to be compatible with the Keil IDE if you are going to buy their package. After all, someone with a commercial license may still want to use gcc because they may intend to release the source code for free later - but want their commercial license to be able to debug a large binary.

  • ... keil's tools are designed for this board

    Not really - the tools are pretty much agnostic to what board you use.

    But, if that's your reasoning, why don't you just use Keil tools?

    "I don't want to use real view"

    So why use uVision?

    "I want to keep GCC"

    Fair enough - so why not use it with an IDE that's ready made for it?

    The board neither knows nor cares what tools you use!