• AVR Freaks

Hot!Illogical problem?

Author
peterg1000
Senior Member
  • Total Posts : 171
  • Reward points : 0
  • Joined: 2009/01/29 13:07:52
  • Location: Flamstead, Herts, UK
  • Status: offline
2020/03/26 09:51:23 (permalink)
0

Illogical problem?

Recently been learning to programme in PIC24 assembler, and have completed part of the learning project.  Now I want to move ahead with the next stage, and have created a new project for this,  The starting point are all the project files from the completed and operational project, and these have been imported unchanged copies from the original (which still assembles and links correctly).
 
Attempting to build the new project fails, as the assembler says it cannot read an include file that works correctly in the original. I've tried restarting MPLAB-X, rebooting the laptop, and even recreating the "faulty" file from scratch.  The file in  question uses equates to define meaningful names for particular file bits to aid visibility when debugging. For example :-
 
"    .equ    sec00_flg,    0X0000  "
This works as expected in the first project.  The new project builds correctly if "#sec00_flg" is changed to "#0x0000" wherever it occurs.
 
I've run out of ideas on this one, but has anyone experienced a similar oddity and found a cure?  A screen capture attached shows the results of a debug attempt with the equate in place.
 

Attached Image(s)

#1

8 Replies Related Threads

    NorthGuy
    Super Member
    • Total Posts : 5970
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Illogical problem? 2020/03/26 11:19:55 (permalink)
    4 (1)
    The error says it cannot open the file. It cannot know what's inside the file without opening it, so the contents of the file doesn't matter.
     
    Possible causes would be file does not exist anywhere where the compiler looks, permissions are wrong, the file is open in another program, a different file exists with the same name which is already open or has bad permissions etc. etc.
    #2
    NKurzman
    A Guy on the Net
    • Total Posts : 18424
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Illogical problem? 2020/03/26 11:41:46 (permalink)
    0
    It could also be a Problem with the Path.
    #3
    peterg1000
    Senior Member
    • Total Posts : 171
    • Reward points : 0
    • Joined: 2009/01/29 13:07:52
    • Location: Flamstead, Herts, UK
    • Status: offline
    Re: Illogical problem? 2020/03/26 12:27:17 (permalink)
    0
    Hi both, thanks for the thoughts.
     
    I tried recreating the file with a different name, with the same result.  The path appears correct as I can view the file in the editor, and this is confirmed by the pop up in the screen capture. Am I being naive here?
     
    No idea about permissions though - never had a problem before, but I'll check this out anyway.
    #4
    ric
    Super Member
    • Total Posts : 26159
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Illogical problem? 2020/03/26 12:31:21 (permalink)
    5 (2)
    The file in your project has a relative path starting with "..\..\Inc"
    The path in the #include line only has a single "..\"
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    peterg1000
    Senior Member
    • Total Posts : 171
    • Reward points : 0
    • Joined: 2009/01/29 13:07:52
    • Location: Flamstead, Herts, UK
    • Status: offline
    Re: Illogical problem? 2020/03/26 15:32:34 (permalink)
    0
    Hi Ric,
    But then so has the other header file - eg   .include "..\inc\p24F16KA102.inc" and that is recognised OK.
     
    I did originally suspect the declared path and tried an additional "..\"  - but it made no difference.  It also checks out in the pop up on the screen capture
    I did check file permissions - everything is allowed by all users, so don't think that is the problem.
     
    The fact that the files were just copied from working originals makes this a very weird problem.
     
    #6
    LdB_ECM
    Super Member
    • Total Posts : 312
    • Reward points : 0
    • Joined: 2019/04/16 22:01:25
    • Location: 0
    • Status: offline
    Re: Illogical problem? 2020/03/26 20:18:24 (permalink)
    5 (2)
    You need to understand if you use relative path it is RELATIVE TO THE FILE IT IS CALLED FROM.
     
    So can we do the bleeding obvious give us the full path to these 2 files
    Rambits.inc
    Decode.s
     
    I am going to guess they are actually in the directory and it should be just #include "Rambits.inc"
    #7
    peterg1000
    Senior Member
    • Total Posts : 171
    • Reward points : 0
    • Joined: 2009/01/29 13:07:52
    • Location: Flamstead, Herts, UK
    • Status: offline
    Re: Illogical problem? 2020/03/27 02:26:57 (permalink)
    0
    Hi LdB_ECM
     
    Thanks for your thoughts
     
    Took your hint ( do the bleeding obvious!! ) and put the complete path (  .include "C:\MPLABX24\24F_I2C_dev\inc\Rambits.inc" ) in for just that one file and .........   it worked!!! See attached image!!
     
    Great, but it now raises the question - how come it works for the other .inc file in that application.  Furthermore there has never been a similar problem in any other project, both PIC18F or PIC24F.
     
    Just had an evil thought - all the others have been created using MPLAB-X V5.30 or lower.  Current one is the first totally configured under 5.35.  More research is needed I fear, but unfortunately I have removed 5.30,  however it is probably worth re-installing to prove the point.
     
     
     
     


     

    Attached Image(s)

    #8
    peterg1000
    Senior Member
    • Total Posts : 171
    • Reward points : 0
    • Joined: 2009/01/29 13:07:52
    • Location: Flamstead, Herts, UK
    • Status: offline
    Re: Illogical problem? 2020/03/27 03:30:53 (permalink)
    4 (1)
    Update on "mystery" !! Eating humble pie!!
     
    Ric was absolutely correct about the path error - changed the path to     .include "..\..\inc\Rambits.inc" and the build completed  - error free.  I thought I had tried that change yesterday without success - maybe there was another error to compound the problem.

    It would seem the only thing illogical was my approach to the problem - thanks to all who helped straighten my thinking. Guess my remarks with regard to V5.3 / V5.35 are irrelevant now.
    #9
    Jump to:
    © 2020 APG vNext Commercial Version 4.5