[Sdcc-user] __addressmod

2020-03-03 Thread Vahid Bashiri
Hi all I need something like this __addressmod AREA_NAME; AREA_NAME int var[10]; so I can do sdcc -b AREA_NAME=0xA000 ... and place "var" (and possibly other variables) in special area, started at 0xA000. But its is not supported by SDCC so I made some patches to source code and get it to work. I

[Sdcc-user] Is this a bug?

2020-04-13 Thread Vahid Bashiri
I have this piece of code wont compile when I write: sdcc test.c -mstm8 --std-sdcc11 --all-callee-saves --verbose --stack-auto --fverbose-asm --float-reent --no-peep --debug I get error "machine specific addressing or addressing mode error". Its look like the generated assembly is not correct. Is

Re: [Sdcc-user] Is this a bug?

2020-04-14 Thread Vahid Bashiri
:51 schrieb Vahid Bashiri: > > int func(void *var,int val); > > typedef int (*SetVal)(void *, int); > > typedef struct { > > int val; > > SetVal setval; > > } my_struct; > > int main() > > { > > >

Re: [Sdcc-user] Is this a bug?

2020-04-15 Thread Vahid Bashiri
lve the problem. I hope someone correct me or the source code. On Tue, Apr 14, 2020 at 4:37 PM Vahid Bashiri wrote: > This is not the assembler. > For first call generated code is: call #(_func + 0) which is not a valid > stm8 assembly. For second call sdcc generates call (x) where x co

Re: [Sdcc-user] How to control segment placement from C?

2020-04-26 Thread Vahid Bashiri
I did something like this some time ago. I am not sure about details but it might be relevant to your problem. create an assembly file and put your segment in order you want in it and link it with the rest of your code. something like this: .area RETAIN .area DATA .area space_a .area

Re: [Sdcc-user] Crash of sdasstm8 with --debug, --out-fmt-elf and __naked functions

2020-05-12 Thread Vahid Bashiri
I'v seen exactly the same problem with "--out-fmt-elf" and "_naked". it must be bug. On Sun, May 10, 2020 at 8:55 PM Basil Hussain wrote: > Hi all, > > I have encountered an odd problem with sdasstm8 crashing. I believe I > have narrowed it down to a particular set of circumstances, which are: >

[Sdcc-user] bit addressing for stm8

2021-02-14 Thread Vahid Bashiri
It looks like __bit only works for 8951. Any attempt to extend it to other architectures ? I am particularly interested in stm8. ___ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user