Author Topic: i havn't any HEX file in SDCC  (Read 9268 times)

Offline majid.ebru

  • Single posting newcomer
  • *
  • Posts: 6
i havn't any HEX file in SDCC
« on: March 19, 2015, 02:43:33 pm »
Hi
i read this link
http://www.nicolas-sanagustin.fr/index.php/2013/03/27/comment-programmer-un-pic-avec-sdcc-et-codeblocks/

and do every thing
but i havn't any HEX file?
please download and see this clip and help me.
waht is my Wrong ?



I can't post masage in that site?
whyyyyyyyyyyyyyyyyyyy?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: i havn't any HEX file in SDCC
« Reply #1 on: March 19, 2015, 03:42:53 pm »
What version SDCC did you install?

Edit: What Code::Blocks version are you using?

Post the build log.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.


« Last Edit: March 19, 2015, 04:46:43 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline majid.ebru

  • Single posting newcomer
  • *
  • Posts: 6
Re: i havn't any HEX file in SDCC
« Reply #2 on: March 19, 2015, 10:50:59 pm »
My version SDCC is 3.4.0??

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: i havn't any HEX file in SDCC
« Reply #3 on: March 20, 2015, 02:05:17 am »
I will NOT be down loading an exe from you.

I will wait for a build log or consider you to be a troll.

Tim S.
« Last Edit: March 20, 2015, 02:22:22 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: i havn't any HEX file in SDCC
« Reply #4 on: March 20, 2015, 02:59:28 am »
What I get as the Build log following the images on the link you posted.

Code
-------------- Build: Release in pic_test (compiler: Small Device C Compiler)---------------

sdcc.exe  --out-fmt-ihx -mpic16 --opt-code-size --verbose --use-non-free -p18f2550     -c main.c -o obj\Release\main.o
WARNING: The target device seems to support XINST and no #pragma config XINST=OFF was found.
         The code generated by SDCC does probably not work when XINST is enabled (possibly by default).
         Please make sure to disable XINST.
         (If the target does not actually support XINST, please report this as a bug in SDCC.)
obj\Release\main.asm:278:Message[1301] Using default destination of 0 (Access Bank).
obj\Release\main.asm:284:Message[1301] Using default destination of 0 (Access Bank).
obj\Release\main.asm:286:Message[1301] Using default destination of 0 (Access Bank).
obj\Release\main.asm:298:Message[1301] Using default destination of 0 (Access Bank).
obj\Release\main.asm:300:Message[1301] Using default destination of 0 (Access Bank).
Processor: 18f2550
sdcc: Calling preprocessor...
sdcc: Generating code...
sdcc: Calling assembler...
sdcc.exe  -o bin\Release\pic_test.hex  --out-fmt-ihx -mpic16 --opt-code-size --verbose --use-non-free -p18f2550      obj\Release\main.o
message: Using default linker script "C:\Apps32\gputils\lkr\18f2550_g.lkr".
Processor: 18f2550
sdcc: Calling linker...
Output file is bin\Release\pic_test.hex with size 681.00 bytes

NOTE: I did one step not in the images I added the path of "C:\Apps32\gputils\bin" to the SDCC Additional paths under the compiler toolchain tab.
This is because I never add gputils or compilers to the Windows search PATH it causes to many weird errors when you run many different compilers and other tools.

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline majid.ebru

  • Single posting newcomer
  • *
  • Posts: 6
Re: i havn't any HEX file in SDCC
« Reply #5 on: March 21, 2015, 02:44:49 pm »
My OS is windows 7 home premium x64
my code::Blocks versin is 13.12
and
I upload file in Dropbox

https://dl.dropboxusercontent.com/u/106951030/PIC-SDCC.exe

https://dl.dropboxusercontent.com/u/106951030/PIC-SDCC.exe

please see
i can't explain.


Code
-------------- Build: Release in Pic-201 (compiler: Small Device C Compiler)---------------

sdcc.exe -L"D:\Program Files\10\SDCC\lib" -o ..\..\PIC-01\Pic-201.hex  --out-fmt-ihx -mpic16 --verbose --use-non-free -p18f2550  --use-non-free     obj\Release\pic-202.rel
at 1: warning 119: don't know what to do with file 'obj\Release\pic-202.rel'. file extension unsupported
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.4.0 #8981 (Apr  5 2014) (MINGW64)
published under GNU General Public License (GPL)
Usage : sdcc [options] filename
Options :-
General options:
      --help                Display this help
  -v  --version             Display sdcc's version
      --verbose             Trace calls to the preprocessor, assembler, and linker
  -V                        Execute verbosely. Show sub commands as they are run
  -d                       
  -D                        Define macro as in -Dmacro
  -I                        Add to the include (*.h) path, as in -Ipath
  -A                       
  -U                       
  -M                        Preprocessor option
  -W                        Pass through options to the pre-processor (p), assembler (a) or linker (l)
  -S                        Compile only; do not assemble or link
  -c  --compile-only        Compile and assemble, but do not link
  -E  --preprocessonly      Preprocess only, do not compile
      --c1mode              Act in c1 mode.  The standard input is preprocessed code, the output is assembly code.
  -o                        Place the output into the given path resp. file
      --print-search-dirs   display the directories in the compiler's search path
      --vc                  messages are compatible with Micro$oft visual studio
      --use-stdout          send errors to stdout instead of stderr
      --nostdlib            Do not include the standard library directory in the search path
      --nostdinc            Do not include the standard include directory in the search path
      --less-pedantic       Disable some of the more pedantic warnings
      --disable-warning     <nnnn> Disable specific warning
      --Werror              Treat the warnings as errors
      --debug               Enable debugging symbol output
      --cyclomatic          Display complexity of compiled functions
      --std-c89             Use C89 standard (slightly incomplete)
      --std-sdcc89          Use C89 standard with SDCC extensions (default)
      --std-c99             Use C99 standard (incomplete)
      --std-sdcc99          Use C99 standard with SDCC extensions
      --std-c11             Use C11 standard (very incomplete)
      --fdollars-in-identifiers  Permit '$' as an identifier character
      --funsigned-char      Make "char" unsigned by default
      --use-non-free        Search / include non-free licensed libraries and header files
Code generation options:
  -m                        Set the port to use e.g. -mz80.
  -p                        Select port specific processor e.g. -mpic14 -p16f84
      --model-small         internal data space is used (default)
      --model-medium        external paged data space is used
      --model-large         external data space is used
      --model-huge          functions are banked, data in external space
      --stack-auto          Stack automatic variables
      --xstack              Use external stack
      --int-long-reent      Use reentrant calls on the int and long support functions
      --float-reent         Use reentrant calls on the float support functions
      --xram-movc           Use movc instead of movx to read xram (xdata)
      --callee-saves        <func[,func,...]> Cause the called function to save registers instead of the caller
      --profile             On supported ports, generate extra profiling information
      --fomit-frame-pointer  Leave out the frame pointer.
      --all-callee-saves    callee will always save registers used
      --stack-probe         insert call to function __stack_probe at each function prologue
      --no-xinit-opt        don't memcpy initialized xram from code
      --no-c-code-in-asm    don't include c-code as comments in the asm file
      --no-peep-comments    don't include peephole optimizer comments
      --short-is-8bits      Make short 8 bits (for old times sake)
      --codeseg             <name> use this name for the code segment
      --constseg            <name> use this name for the const segment
Optimization options:
      --nooverlay           Disable overlaying leaf function auto variables
      --nogcse              Disable the GCSE optimisation
      --nolabelopt          Disable label optimisation
      --noinvariant         Disable optimisation of invariants
      --noinduction         Disable loop variable induction
      --nojtbound           Don't generate boundary check for jump tables
      --noloopreverse       Disable the loop reverse optimisation
      --no-peep             Disable the peephole assembly file optimisation
      --no-reg-params       On some ports, disable passing some parameters in registers
      --peep-asm            Enable peephole optimization on inline assembly
      --peep-return         Enable peephole optimization for return instructions
      --no-peep-return      Disable peephole optimization for return instructions
      --peep-file           <file> use this extra peephole file
      --opt-code-speed      Optimize for code speed rather than size
      --opt-code-size       Optimize for code size rather than speed
      --max-allocs-per-node  Maximum number of register assignments considered at each node of the tree decomposition
      --nolospre            Disable lospre
      --lospre-unsafe-read  Allow unsafe reads in lospre
Internal debugging options:
      --dump-ast            Dump front-end AST before generating i-code
      --dump-i-code         Dump the i-code structure at all stages
      --dump-graphs         Dump graphs (control-flow, conflict, etc)
      --i-code-in-asm       Include i-code as comments in the asm file
      --fverbose-asm        Include code generator comments in the asm output
Linker options:
  -l                        Include the given library in the link
  -L                        Add the next field to the library search path
      --lib-path            <path> use this path to search for libraries
      --out-fmt-ihx         Output in Intel hex format
      --out-fmt-s19         Output in S19 hex format
      --xram-loc            <nnnn> External Ram start location
      --xram-size           <nnnn> External Ram size
      --iram-size           <nnnn> Internal Ram size
      --xstack-loc          <nnnn> External Stack start location
      --code-loc            <nnnn> Code Segment Location
      --code-size           <nnnn> Code Segment size
      --stack-loc           <nnnn> Stack pointer initial value
      --data-loc            <nnnn> Direct data start location
      --idata-loc           
      --no-optsdcc-in-asm   Do not emit .optsdcc in asm
Special options for the mcs51 port:
      --stack-size          Tells the linker to allocate this space for stack
      --parms-in-bank1      use Bank1 for parameter passing
      --pack-iram           Tells the linker to pack variables in internal ram (default)
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
      --acall-ajmp          Use acall/ajmp instead of lcall/ljmp
      --no-ret-without-call  Do not use ret independent of acall/lcall
Special options for the z80 port:
      --callee-saves-bc     Force a called function to always save BC
      --portmode=           Determine PORT I/O mode (z80/z180)
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
      --codeseg             <name> use this name for the code segment
      --constseg            <name> use this name for the const segment
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
      --oldralloc           Use old register allocator
      --fno-omit-frame-pointer  Do not omit frame pointer
Special options for the z180 port:
      --callee-saves-bc     Force a called function to always save BC
      --portmode=           Determine PORT I/O mode (z80/z180)
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
      --codeseg             <name> use this name for the code segment
      --constseg            <name> use this name for the const segment
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
      --oldralloc           Use old register allocator
      --fno-omit-frame-pointer  Do not omit frame pointer
Special options for the r2k port:
      --callee-saves-bc     Force a called function to always save BC
      --portmode=           Determine PORT I/O mode (z80/z180)
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
      --codeseg             <name> use this name for the code segment
      --constseg            <name> use this name for the const segment
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
      --oldralloc           Use old register allocator
      --fno-omit-frame-pointer  Do not omit frame pointer
Special options for the r3ka port:
      --callee-saves-bc     Force a called function to always save BC
      --portmode=           Determine PORT I/O mode (z80/z180)
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
      --codeseg             <name> use this name for the code segment
      --constseg            <name> use this name for the const segment
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
      --oldralloc           Use old register allocator
      --fno-omit-frame-pointer  Do not omit frame pointer
Special options for the gbz80 port:
      -bo                   <num> use code bank <num>
      -ba                   <num> use data bank <num>
      --callee-saves-bc     Force a called function to always save BC
      --codeseg             <name> use this name for the code segment
      --constseg            <name> use this name for the const segment
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
Special options for the tlcs90 port:
      --callee-saves-bc     Force a called function to always save BC
      --portmode=           Determine PORT I/O mode (z80/z180)
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
      --codeseg             <name> use this name for the code segment
      --constseg            <name> use this name for the const segment
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
      --oldralloc           Use old register allocator
      --fno-omit-frame-pointer  Do not omit frame pointer
Special options for the ds390 port:
      --model-flat24        use the flat24 model for the ds390 (default)
      --stack-8bit          use the 8bit stack for the ds390 (not supported yet)
      --stack-size          Tells the linker to allocate this space for stack
      --pack-iram           Tells the linker to pack variables in internal ram (default)
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
      --stack-10bit         use the 10bit stack for ds390 (default)
      --use-accelerator     generate code for ds390 arithmetic accelerator
      --protect-sp-update   will disable interrupts during ESP:SP updates
      --parms-in-bank1      use Bank1 for parameter passing
Special options for the pic16 port:
      --pstack-model=       use stack model 'small' (default) or 'large'
  -y  --extended            enable Extended Instruction Set/Literal Offset Addressing mode
      --pno-banksel         do not generate BANKSEL assembler directives
      --obanksel=           set banksel optimization level (default=0 no)
      --denable-peeps       explicit enable of peepholes
      --no-optimize-goto    do NOT use (conditional) BRA instead of GOTO
      --optimize-cmp        try to optimize some compares
      --optimize-df         thoroughly analyze data flow (memory and time intensive!)
      --asm=                Use alternative assembler
      --mplab-comp          enable compatibility mode for MPLAB utilities (MPASM/MPLINK)
      --link=               Use alternative linker
      --preplace-udata-with=  Place udata variables at another section: udata_acs, udata_ovr, udata_shr
      --ivt-loc=            Set address of interrupt vector table.
      --nodefaultlibs       do not link default libraries when linking
      --use-crt=            use <crt-o> run-time initialization module
      --no-crt              do not link any default run-time initialization module
      --debug-xtra          show more debug info in assembly output
      --debug-ralloc        dump register allocator debug file *.d
      --pcode-verbose       dump pcode related info
      --calltree            dump call tree in .calltree file
      --gstack              trace stack pointer push/pop to overflow
      --no-warn-non-free    suppress warning on absent --use-non-free option
Special options for the pic14 port:
      --debug-xtra          show more debug info in assembly output
      --no-pcode-opt        disable (slightly faulty) optimization on pCode
      --stack-size          sets the size if the argument passing stack (default: 16, minimum: 4)
      --no-extended-instructions  forbid use of the extended instruction set (e.g., ADDFSR)
      --no-warn-non-free    suppress warning on absent --use-non-free option
Special options for the TININative port:
      --model-flat24        use the flat24 model for the ds390 (default)
      --stack-8bit          use the 8bit stack for the ds390 (not supported yet)
      --stack-size          Tells the linker to allocate this space for stack
      --pack-iram           Tells the linker to pack variables in internal ram (default)
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
      --stack-10bit         use the 10bit stack for ds390 (default)
      --use-accelerator     generate code for ds390 arithmetic accelerator
      --protect-sp-update   will disable interrupts during ESP:SP updates
      --parms-in-bank1      use Bank1 for parameter passing
      --tini-libid          <nnnn> LibraryID used in -mTININative
Special options for the ds400 port:
      --model-flat24        use the flat24 model for the ds400 (default)
      --stack-8bit          use the 8bit stack for the ds400 (not supported yet)
      --stack-size          Tells the linker to allocate this space for stack
      --pack-iram           Tells the linker to pack variables in internal ram (default)
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
      --stack-10bit         use the 10bit stack for ds400 (default)
      --use-accelerator     generate code for ds400 arithmetic accelerator
      --protect-sp-update   will disable interrupts during ESP:SP updates
      --parms-in-bank1      use Bank1 for parameter passing
Special options for the hc08 port:
      --out-fmt-elf         Output executable in ELF format
      --oldralloc           Use old register allocator
Special options for the s08 port:
      --out-fmt-elf         Output executable in ELF format
      --oldralloc           Use old register allocator
Processor: 18f2550
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
« Last Edit: March 21, 2015, 03:17:32 pm by majid.ebru »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: i havn't any HEX file in SDCC
« Reply #6 on: March 21, 2015, 04:22:57 pm »
Please read and follow the directions you link to in your original post.

You do read French, correct?

Those directions likely told you to change "obj\Release\pic-202.rel" to "obj\Release\pic-202.hex"

The image that shows doing that; I would guess the words match the image.
http://www.nicolas-sanagustin.fr/wp-content/uploads/2013/03/configprjproperties.jpg

Tim S.
« Last Edit: March 21, 2015, 04:27:27 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline majid.ebru

  • Single posting newcomer
  • *
  • Posts: 6
Re: i havn't any HEX file in SDCC
« Reply #7 on: March 21, 2015, 04:51:49 pm »
i use GoogelTranslate to traslate to english.
i change it but dont work??
Code
-------------- Build: Release in majid-PIC (compiler: Small Device C Compiler)---------------

Linking stage skipped (build target has no object files to link)
Nothing to be done (all items are up-to-date).


-------------- Run: Release in majid-PIC (compiler: Small Device C Compiler)---------------

Checking for existence: C:\Users\MaJiD\Desktop\Majid-PIC\majid-PIC\bin\Release\majid-PIC.hex

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: i havn't any HEX file in SDCC
« Reply #8 on: March 21, 2015, 05:13:58 pm »
Do a rebuild or a clean and build; instead of just a build.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: i havn't any HEX file in SDCC
« Reply #9 on: March 21, 2015, 05:36:07 pm »
If after doing a rebuild you still have a problem zip up the CB Project you are using that is the file with extension .cbp and attach it to your next post.

FYI: If you link to one more exe I am going to give up helping you and ask that you be banned.

Tim S.
« Last Edit: March 21, 2015, 06:59:04 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: i havn't any HEX file in SDCC
« Reply #10 on: March 21, 2015, 07:26:19 pm »
@majid.ebru:
1- Go to 'Settings -> Compiler'
2- Select 'SDCC Compiler'
3- Go to 'Other settings' tab
4- Click 'Advanced options'
5- Go to 'Others' tab
6- Insert 'o' (letter o) into 'Object file extension'
7- Click 'OK'
8- Click 'OK'
9- Restart CodeBlocks
10- Rebuild your project
11- Post build log
12- DO NOT post links to '.exe' files ever
« Last Edit: March 21, 2015, 07:28:00 pm by scarphin »

Offline majid.ebru

  • Single posting newcomer
  • *
  • Posts: 6
Re: i havn't any HEX file in SDCC
« Reply #11 on: March 21, 2015, 09:08:36 pm »
So sorry
apology
i don't put the post
« Last Edit: March 21, 2015, 09:15:03 pm by majid.ebru »

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: i havn't any HEX file in SDCC
« Reply #12 on: March 21, 2015, 10:32:10 pm »
@majid.ebru:
So did you try what I posted?

@devs:
If his problem is what I think it is,
Code
at 1: warning 119: don't know what to do with file 'obj\Release\pic-202.rel'. file extension unsupported
this problem seems to appear periodically. What I suggest is set the 'Object file extension' to 'rel' for 'SDCC Compiler' and make a duplicate named 'SDCC PIC Compiler' (or similar) with 'Object file extension' set to 'o'. Or users will come asking why it doesn't work either for PICs or 8051s depending on their CB version.

Offline majid.ebru

  • Single posting newcomer
  • *
  • Posts: 6
Re: i havn't any HEX file in SDCC
« Reply #13 on: June 22, 2015, 03:05:19 pm »

NOTE: I did one step not in the images I added the path of "C:\Apps32\gputils\bin" to the SDCC Additional paths under the compiler toolchain tab.
This is because I never add gputils or compilers to the Windows search PATH it causes to many weird errors when you run many different compilers and other tools.

Tim S.

Hi
finally , i can build HEX file.
now
can help me about how to use SDCC  in C:B?