Re: [Sdcc-user] What are the main (dis)advantages of SDCC vs. non-free compilers?

2022-07-21 Thread Sebastien Lorquet
Hi The main avantage of sdcc is that it is free and maintained, and it works well. The disadvantage for me is the lack of linker scripting and easy manipulation / mapping of code and data sections. Sebastien Le 21/07/2022 à 14:06, Philipp Klaus Krause a écrit : Dear SDCC users, you have

Re: [Sdcc-user] Possible changes to inline assembler syntax

2022-07-15 Thread Sebastien Lorquet
Hi, On 7/15/22 17:10, Maarten Brock wrote: Philipp Klaus Krause schreef op 2022-07-15 16:45: Since people like form 1, I'd now think we should keep it, but drop #pragma sdcc_hash. That looks like a better way forward and also solves the issues. When this pragma is dropped does that mean it

Re: [Sdcc-user] How useful would arbitrary-width integers be?

2020-10-12 Thread Sebastien Lorquet
Hello, It could be useful in bit packed structure, but that implies the absence of any padding bits... I cant think of a use case outside of structures. BTW, Cant you achieve arbitrary size integers with a bitfield structure? https://stackoverflow.com/questions/3917425/how-to-implement-unsi

Re: [Sdcc-user] __addressmod

2020-03-05 Thread Sebastien Lorquet
Hello, I dont think named sections are supported in sdcc, but if they are done one day, I think that should be done using the usual attribute syntax: int var[10] __attribute__(( section("AREA_NAME") )); This is also usable on functions. Sebastien Le 03/03/2020 à 19:05, Vahid Bashiri a écrit

Re: [Sdcc-user] FOSDEM talk on the Padauk toolchain on the 2nd of February

2019-12-20 Thread Sebastien Lorquet
I had forgotten that NuttX had a Z80 port. what kind of features do you need to use NuttX on a Z80? How many RAM, NV memory, and what peripherals? Would it be possible to do it without memory banking? Sebastien Le 20/12/2019 à 12:56, Alan Carvalho de Assis a écrit : > Hi Philipp, > > Very nice

Re: [Sdcc-user] sdcc issue

2019-11-13 Thread Sebastien Lorquet
Hello I dont know if this option exists in the SDCC linker, but there is a possible alternative: Define each function in his own file, and then bundle all compiled objects in a static library (if needed). Then the linker should be able to include only the required object files. Sebastien Le 23/

Re: [Sdcc-user] PIC18 extended instruction set support

2015-01-30 Thread Sebastien Lorquet
Le 30/01/2015 15:43, Kustaa Nyholm a écrit : > DIP unfortunately. Yep... A more recent TQFP version would "just" require an adapter board... But we're in real life, I know... Sébastien Lorquet -- Dive into the World of

Re: [Sdcc-user] Question about genCall

2014-10-02 Thread Sebastien Lorquet
Hello, On the PC ASLR will reduce the interest of calling function by direct litteral address. But, for example, if you know for sure that the libc is loaded at address X and the function you want has offset Y within this lib, you could certainly call that function directly using this syntax. --

Re: [Sdcc-user] single precision - computing sidereal time

2014-07-09 Thread Sebastien Lorquet
hello Maybe you can also use arbitrary precision fixed or floating point, using a bcd coding or not. example: using BCD, numbers from 0 to 99 with 14 decimal places uchar val1[16] = {0,6, 6,9,7,3,7,4,5,5,8,0,0,0,0,0}; //store 6.697374558 uchar vak2[16] = {0,0, 0,6,5,7,0,9,8,2,4,4,1,9,0,8}; //0

Re: [Sdcc-user] SDCC/STM8 questions

2014-03-31 Thread Sebastien Lorquet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hello yes, SDCC can be integrated with code blocks. You can choose a "sdcc" compiler type in the project settings. The built-in option list may be a little outdated, but you can still add any option by hand. I have used that myself a few times with

Re: [Sdcc-user] IAR with SDCC

2014-02-14 Thread Sebastien Lorquet
m a écrit : > On 13/02/2014 16:56, "Sebastien Lorquet" wrote: > >> yes, but that's only the bright side. >> >> Also, >> >> -developers are not often paid, so you have to wait until they have >> enough free time > > That is true, then

Re: [Sdcc-user] IAR with SDCC

2014-02-13 Thread Sebastien Lorquet
yes, but that's only the bright side. Also, -developers are not often paid, so you have to wait until they have enough free time -architecture changes are rare since it requires a lot of time to break big things and rebuild them -the number of contributors with enough skills and time to be abl

Re: [Sdcc-user] cons char * in RAM space

2013-06-10 Thread Sebastien Lorquet
Le 10/06/2013 10:15, al_bin a écrit : > Yes, number in second [] is necessery. Why? Here is what I think, which may or may not be correct: Because in C a 2-dimensional array is defined as an array of arrays. Which is the same as a pointer to array. And you can't have pointer to undefined types,

Re: [Sdcc-user] USB firmware

2013-03-29 Thread Sebastien Lorquet
never ever use microchip usb libraries for any serious project they are buggy, huge, support lots of useless features (including ability to compile for pic32) I found it's easier to build a stack from scratch with inspirations from other codes. At least that's my experience. Best regards Sebast

Re: [Sdcc-user] Bug with PIC18F interrupt routine definition

2013-02-28 Thread Sebastien Lorquet
Hi, I don't know if you're doing it right or not, but for pic16 I always had success by using the routines and helpers from signal.h The only thing you can't do is declare an interrupt routine in a H file and define it elsewhere (and I don't know why :) ). Regards, Sebastien Le 28/02/2013 10:25

Re: [Sdcc-user] Adding support for the 6502 processor

2012-09-05 Thread Sebastien Lorquet
Le 04/09/2012 20:55, Masur Jonathan a écrit : > I am under the impression this is exactly what SDCC does - not using an > argument stack for maximal code optimisation - at the cost to not being > able to write re-entrant functions. But this is a very small price to > pay for something that can

[Sdcc-user] pic port and stack

2012-05-10 Thread Sebastien Lorquet
hello, the pic port passes all arguments via the stack. this consumes a LOT of code. Isn't there an option to use overlayed RAM such as the MCS51 port does? half of my code is only stack push/pop! Really, I don't care about reentrancy for my routines! Regards Sebastien L

Re: [Sdcc-user] PIC18F: Define array at fixed location in the ram

2012-02-02 Thread Sebastien Lorquet
Hi, why don't you have a try with this syntax, then check the map file? mcc18 uses #pragmas to do that, but __at is probably the correct way with sdcc. I don't think that's a professionnality issue :) An idea, you could check how it's done in device header files. Here, the SFR are declared as

Re: [Sdcc-user] SDCC Compiler Issue

2011-10-06 Thread Sebastien Lorquet
This is because a microcontroller is an embedded platform that obviously has no standard console, so you have to define the proper way to write characters to a console. Regards Seb Le 05/10/2011 19:16, Theo Tijssen a écrit : > Hello! I have a simple program in C language that I was hoping to comp

Re: [Sdcc-user] Inline Assembler from a Macro

2011-08-30 Thread Sebastien Lorquet
Hi, what about using movf with inline assembly? Sebastien Le 30/08/2011 00:51, Mario a écrit : > Hello, its me ...once again. > > I have tried to do the following. > > #define SOMEASMHERE __asm\ > ASM INSTRUCTION\ > OTHER ONE\ > ETC\ > __endasm; > > where “ASM INSTRUCTION”, “OTHE

Re: [Sdcc-user] Absolute addressing

2011-08-30 Thread Sebastien Lorquet
Hi, c18 uses #pragma to define the section for the following code. Do we have __attribute__(section) or something like that in SDCC? If you can control the section for a function, you can play with the gplink linker script to place any "single function section" anywhere you want. Sebastien Le 3