Re: Exceptions in ARM

2014-03-09 Thread Timo Sintonen
Now I got the exceptions to work. I have not been able to find how to control the libgcc build process. The configure script seems not to know that I give different defaults for the compiler in --with switches. Configure still assumes the compiler defaults arm mode although it is in thumb mod

Re: Exceptions in ARM

2014-03-09 Thread Johannes Pfau
Am Sun, 09 Mar 2014 07:57:45 + schrieb "Timo Sintonen" : > Now I got the exceptions to work. > > I have not been able to find how to control the libgcc build > process. The configure script seems not to know that I give > different defaults for the compiler in --with switches. Configure >

Re: Exceptions in ARM

2014-03-09 Thread Mike
On Sunday, 9 March 2014 at 07:57:46 UTC, Timo Sintonen wrote: Now I got the exceptions to work. Nice Work! Congratulations! I read your wiki, but didn't see your source code yet (I assume its coming, yes?). Anyway, thanks for sharing this information. Mike

Re: Exceptions in ARM

2014-03-08 Thread Timo Sintonen
On Friday, 7 March 2014 at 18:41:35 UTC, Johannes Pfau wrote: > To make sure that libgcc > is built correctly for Cortex-M4 you have to specify > "--with-arch=armv7e-m --with-cpu=cortex-m4 --with-mode=thumb > --with-tune=" when configuring gcc/gdc. > Gcc build fails with these. It will take time

Re: Exceptions in ARM

2014-03-07 Thread Johannes Pfau
Am Sun, 02 Mar 2014 18:33:00 + schrieb "Timo Sintonen" : > On Sunday, 2 March 2014 at 15:36:01 UTC, Johannes Pfau wrote: > > To make sure that libgcc > > is built correctly for Cortex-M4 you have to specify > > "--with-arch=armv7e-m --with-cpu=cortex-m4 --with-mode=thumb > > --with-tune=" whe

Re: Exceptions in ARM

2014-03-02 Thread Timo Sintonen
On Sunday, 2 March 2014 at 15:36:01 UTC, Johannes Pfau wrote: To make sure that libgcc is built correctly for Cortex-M4 you have to specify "--with-arch=armv7e-m --with-cpu=cortex-m4 --with-mode=thumb --with-tune=" when configuring gcc/gdc. (And I don't see these flags mentioned in https://bitb

Re: Exceptions in ARM

2014-03-02 Thread Johannes Pfau
Am Sun, 02 Mar 2014 11:20:53 + schrieb "Timo Sintonen" : > On Saturday, 1 March 2014 at 12:53:14 UTC, Johannes Pfau wrote: > > > > > However, someone also had this problem on this german site: > > http://www.mikrocontroller.net/topic/312956 > > > > and the solution was that -mcpu alone was no

Re: Exceptions in ARM

2014-03-02 Thread Timo Sintonen
On Saturday, 1 March 2014 at 12:53:14 UTC, Johannes Pfau wrote: However, someone also had this problem on this german site: http://www.mikrocontroller.net/topic/312956 and the solution was that -mcpu alone was not good enough, he had to specify -march flags as well so please double-check your

Re: Exceptions in ARM

2014-03-01 Thread Johannes Pfau
On Saturday, 1 March 2014 at 11:46:03 UTC, Timo Sintonen wrote: I checked my code and the library code and there is no other call like this. I think there is one thing that makes this function special: if I understand correct, this function will not return. If there is some noreturn attribute

Re: Exceptions in ARM

2014-03-01 Thread Timo Sintonen
On Saturday, 1 March 2014 at 10:49:57 UTC, Johannes Pfau wrote: On Saturday, 1 March 2014 at 09:24:40 UTC, Mike wrote: On Saturday, 1 March 2014 at 08:56:26 UTC, Timo Sintonen wrote: There is nothing interesting in the assembly, only this wrong call. This form of instruction is just missing in

Re: Exceptions in ARM

2014-03-01 Thread Johannes Pfau
On Saturday, 1 March 2014 at 09:24:40 UTC, Mike wrote: On Saturday, 1 March 2014 at 08:56:26 UTC, Timo Sintonen wrote: There is nothing interesting in the assembly, only this wrong call. This form of instruction is just missing in M4 and it gives an invalid instruction fault. So what are we argu

Re: Exceptions in ARM

2014-03-01 Thread Mike
On Saturday, 1 March 2014 at 08:56:26 UTC, Timo Sintonen wrote: There is nothing interesting in the assembly, only this wrong call. This form of instruction is just missing in M4 and it gives an invalid instruction fault. So what are we arguing about? If this is so hard for us to find, no wonder

Re: Exceptions in ARM

2014-03-01 Thread Timo Sintonen
On Saturday, 1 March 2014 at 07:53:45 UTC, Mike wrote: On Saturday, 1 March 2014 at 07:26:16 UTC, Timo Sintonen wrote: I investigated this a little. It seems that the processor gets a fault interrupt when calling _Unwind_RaiseException in _d_throw. The status bits indicate an invalid instructio

Re: Exceptions in ARM

2014-02-28 Thread Mike
On Saturday, 1 March 2014 at 07:26:16 UTC, Timo Sintonen wrote: I investigated this a little. It seems that the processor gets a fault interrupt when calling _Unwind_RaiseException in _d_throw. The status bits indicate an invalid instruction code. When looking at the disassembly I see that the

Re: Exceptions in ARM

2014-02-28 Thread Timo Sintonen
On Saturday, 1 March 2014 at 02:59:37 UTC, Mike wrote: On Friday, 28 February 2014 at 21:18:05 UTC, Timo Sintonen wrote: On Wednesday, 8 January 2014 at 19:13:36 UTC, Timo Sintonen wrote: On Wednesday, 8 January 2014 at 15:52:25 UTC, Johannes Pfau wrote: Stupid question, but are C++ excepti

Re: Exceptions in ARM

2014-02-28 Thread Mike
On Friday, 28 February 2014 at 21:18:05 UTC, Timo Sintonen wrote: On Wednesday, 8 January 2014 at 19:13:36 UTC, Timo Sintonen wrote: On Wednesday, 8 January 2014 at 15:52:25 UTC, Johannes Pfau wrote: Stupid question, but are C++ exceptions working for you? I think we don't change anything i

Re: Exceptions in ARM

2014-02-28 Thread Timo Sintonen
On Wednesday, 8 January 2014 at 19:13:36 UTC, Timo Sintonen wrote: On Wednesday, 8 January 2014 at 15:52:25 UTC, Johannes Pfau wrote: Stupid question, but are C++ exceptions working for you? I think we don't change anything inthe compiler related to exception handling, so if C++ worked and

Re: Exceptions in ARM

2014-01-08 Thread Mike
On Wednesday, 8 January 2014 at 19:13:36 UTC, Timo Sintonen wrote: On Wednesday, 8 January 2014 at 15:52:25 UTC, Johannes Pfau wrote: Stupid question, but are C++ exceptions working for you? I think we don't change anything inthe compiler related to exception handling, so if C++ worked and

Re: Exceptions in ARM

2014-01-08 Thread Timo Sintonen
On Wednesday, 8 January 2014 at 15:52:25 UTC, Johannes Pfau wrote: Stupid question, but are C++ exceptions working for you? I think we don't change anything inthe compiler related to exception handling, so if C++ worked and D didn't it could only be a problem with the runtime code? I have

Re: Exceptions in ARM

2014-01-08 Thread Johannes Pfau
Am Wed, 08 Jan 2014 08:37:43 + schrieb "Timo Sintonen" : > On Sunday, 5 January 2014 at 10:21:36 UTC, Timo Sintonen wrote: > > On Sunday, 5 January 2014 at 10:06:48 UTC, Johannes Pfau wrote: > > > >> I should really start pushing my local ARM changes upstream. > >> Here's a > >> fix for the E

Re: Exceptions in ARM

2014-01-08 Thread Iain Buclaw
On 8 January 2014 08:37, Timo Sintonen wrote: > On Sunday, 5 January 2014 at 10:21:36 UTC, Timo Sintonen wrote: >> >> On Sunday, 5 January 2014 at 10:06:48 UTC, Johannes Pfau wrote: >> >>> I should really start pushing my local ARM changes upstream. Here's a >>> fix for the EABI unwinder: >>> >>>

Re: Exceptions in ARM

2014-01-08 Thread Timo Sintonen
On Sunday, 5 January 2014 at 10:21:36 UTC, Timo Sintonen wrote: On Sunday, 5 January 2014 at 10:06:48 UTC, Johannes Pfau wrote: I should really start pushing my local ARM changes upstream. Here's a fix for the EABI unwinder: https://github.com/jpf91/GDC/commit/262e432e95cbe31a6764cd337f64022a5

Re: Exceptions in ARM

2014-01-05 Thread Timo Sintonen
On Sunday, 5 January 2014 at 10:06:48 UTC, Johannes Pfau wrote: I should really start pushing my local ARM changes upstream. Here's a fix for the EABI unwinder: https://github.com/jpf91/GDC/commit/262e432e95cbe31a6764cd337f64022a56011eda IIRC I also thought the code in gcc/deh.d wasn't correct

Re: Exceptions in ARM

2014-01-05 Thread Johannes Pfau
Am Sun, 05 Jan 2014 08:26:16 + schrieb "Timo Sintonen" : > On Thursday, 2 January 2014 at 06:54:18 UTC, Timo Sintonen wrote: > > I have fond one thing that confuses me. I have defined > > ARM_EABI_UNWINDER but gcc/deh.d has checks for > > GNU_ARM_EABI_Unwinder. Is this what I should have? Wh

Re: Exceptions in ARM

2014-01-05 Thread Timo Sintonen
On Thursday, 2 January 2014 at 06:54:18 UTC, Timo Sintonen wrote: I have fond one thing that confuses me. I have defined ARM_EABI_UNWINDER but gcc/deh.d has checks for GNU_ARM_EABI_Unwinder. Is this what I should have? When using this I get an error in line 116: static assert ( 8 == 4 ) is fal

Re: Exceptions in ARM

2014-01-01 Thread Timo Sintonen
I have fond one thing that confuses me. I have defined ARM_EABI_UNWINDER but gcc/deh.d has checks for GNU_ARM_EABI_Unwinder. Is this what I should have? When using this I get an error in line 116: static assert ( 8 == 4 ) is false.

Re: Exceptions in ARM

2014-01-01 Thread Johannes Pfau
Am Wed, 01 Jan 2014 14:02:42 + schrieb "Timo Sintonen" : > I started to update minlibd with gdc head from last saturday. > While testing if exceptions work, the program just stops and does > not reach catch or abort. > > Before investigating further, I want to ask the status of arm > excep

Re: Exceptions in ARM

2014-01-01 Thread Timo Sintonen
On Wednesday, 1 January 2014 at 15:19:01 UTC, Iain Buclaw wrote: On 1 Jan 2014 14:05, "Timo Sintonen" wrote: I started to update minlibd with gdc head from last saturday. While testing if exceptions work, the program just stops and does not reach catch or abort. Before investigating furth

Re: Exceptions in ARM

2014-01-01 Thread Iain Buclaw
On 1 Jan 2014 14:05, "Timo Sintonen" wrote: > > I started to update minlibd with gdc head from last saturday. While testing if exceptions work, the program just stops and does not reach catch or abort. > > Before investigating further, I want to ask the status of arm exceptions: are they known to