Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem in default arithmetic for ' i ' variable.

Status
Not open for further replies.
Exactly!!!

And I try in XC8 and MPLAB, and is the same result!!!

The question is: How did he build the program???

hehehe...
 

Hi guys,

I dunno how to place my zip file at here.. But i need to tell something that i using MPLAB in Hi-Tech language.The Coding above is successful build in a hex file and it can blinking !!! Weird ...

Regards,
YY
 

This is my zip file :)
 

Attachments

  • Test.7z
    32.6 KB · Views: 68

For me it gave error, undefined identifier. I am using Hi Tech PICC 9.83 with MPLAB IDE 8.92.
 

Attachments

  • hitech.png
    hitech.png
    115.5 KB · Views: 88
Last edited:

That's what we were talking about!!!

My versions is MPLAB 8.89 and HI-TECH C Compiler for PIC10/12/16 MCUs (PRO Mode) V9.83

How he managed to generate the hex???
 

Maybe he is kidding. He compiled the code with i defined as char or int and then removed the declaration line and then took a screenshot. :lol:
 

Here is my print screen.Why my MPlab with Hi Tech ANSI C Compiler can success?
Untitled.png
 

Now i see the problem!!!

Using old version of mplab (like screenshot) 8.5 and HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode) V9.70 its is possible!!!

Trying to compile, first click on build, we receive the message:

"Error [192] C:\Temp\MCU\Microchip\PIC16F628A\Blink\main.c; 11.6 undefined identifier "i""

If click again, "********** Build successful! **********"

This occurs because file generated .P1 .

I believe this is why.

Using a new version, its break in error message!!!
 
Last edited:

Hi nagkiller,

You're correct.It will failed at the first time,but will success when rebuild again. What actually is the .P1. ? i want go to study on it.

Regards,
YY:grin:
 

interesting so this is compiler bug and i also know about what is .P1. ?
 

P1 is a file generated by compiler... your code is a (p-code) precompiled translated before creating hex file.

Ex: if you project name is test and the source code is main.c, the compiler generate main.pre and main.p1... if the code is ok, he generate the rest:

test.as, test.cof, test.hex, test.hxl, test.lst, test.map, test.obj, test.rlf, test.sdb, test.sym, funclist, startup.as, startup.lst, startup.obj, startup.rlf...

In the manual, may have something about it, or as said before, this is a bug!!
 
Last edited:
  • Like
Reactions: WhyWhy

    WhyWhy

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top