From: SourceForge.net <no...@so...> - 2012-06-02 13:29:40
|
Patches item #3531337, was opened at 2012-06-01 07:53 Message generated for change (Comment added) made by borutr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300599&aid=3531337&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Molnár Károly (molnarkaroly) Assigned to: Borut Ražem (borutr) Summary: The pic14 port, automatically creates the -DpicXXX Initial Comment: The pic14 port, automatically creates the -DpicXXX definition. Now I write the libio directory and this definition needed to distinguish the PIC types. The adc is almost complete. Then comes the usart and i2c. As my time permits. ---------------------------------------------------------------------- >Comment By: Borut Ražem (borutr) Date: 2012-06-02 06:29 Message: Modified patch applied in svn revision #7850. Now pic16 also generates -D__SDCC_PICXXX and pic18fam.h uses it. Borut ---------------------------------------------------------------------- Comment By: Molnár Károly (molnarkaroly) Date: 2012-06-01 13:52 Message: All right, here is another version. I applied the DpicXXX solution therefore, because the branch of the pic16 using the same. Not knowing, that this causes confusion. ---------------------------------------------------------------------- Comment By: Philipp Klaus Krause (spth) Date: 2012-06-01 13:26 Message: I'd prefer __SDCC_PIC16F84: It is both compliant and makes it clear that this is an sdcc-specific define and it fits with the names of our other defines. Philipp ---------------------------------------------------------------------- Comment By: Molnár Károly (molnarkaroly) Date: 2012-06-01 13:17 Message: You can be "__PICXXX". I will send the results. I archive them in order to avoid a conflict. ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2012-06-01 12:00 Message: Currently there is no -D__picXXX: $ sdcc -V -mpic14 -p16f84 -E --std-c99 t.c + C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -std=c99 -obj-ext=.o -D__SDCC=3 _1_5 -D__SDCC_REVISION=7839 -D__SDCC_pic14 -D__SDCC_PROCESSOR="16f84" -D__STDC_N O_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isyst em "C:\Program Files\SDCC\bin\..\include\pic14" -isystem "C:\Program Files\SDCC\ bin\..\include" "t.c" The -D__SDCC_PROCESSOR="16f84" is not usable for comprision: #if __SDCC_PROCESSOR == 12f1822 doesn't work since only macros with numeric values can be compared. So it really seems that implementing -DpicXXX is the only option. I vote for __PICXXX,for example __PIC16F84: two leading underscores and all upper case letters. Or maybe __SDCC_PIC16F84... Borut ---------------------------------------------------------------------- Comment By: Molnár Károly (molnarkaroly) Date: 2012-06-01 11:06 Message: Anyway the -D__picXXX also good. Originally I wanted to send along with libio. Here it is. ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2012-06-01 10:59 Message: * This file is has been generated using ./pic16fam-h-gen.pl . What about the pic16fam-h-gen.pl script? Do you intend to submit it? Borut ---------------------------------------------------------------------- Comment By: Molnár Károly (molnarkaroly) Date: 2012-06-01 10:37 Message: Therefore must that the pic16fam.h to function. This pic18fam.h is modeled on. I upload to the pic16fam.h. ---------------------------------------------------------------------- Comment By: Raphael Neider (tecodev) Date: 2012-06-01 09:47 Message: ... and if it is not, please use -D__picXXX. Philipp only recently worked towards replacing all compiler-generated defines to the standard-compliant form with two leading underscores. I am not sure, but it might even need to be -D__PICXXX (uppercase?). However, if other tools such as mplab to emit -DpicXXX I would like to know about it and withdraw my plea. ---------------------------------------------------------------------- Comment By: Borut Ražem (borutr) Date: 2012-06-01 09:11 Message: Sdcc already generates -D__SDCC_PROCESSOR="XXX", for example -D__SDCC_PROCESSOR="16f842". Isn't this enough to distinguish the PIC type? Borut ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300599&aid=3531337&group_id=599 |