Jump to content



Photo
- - - - -

Optimisation Options For Shc


  • Please log in to reply
2 replies to this topic

#1 Hugh

Hugh

    Newbie

  • Members
  • Pip
  • 9 posts
  • Location:London, uk

  • Calculators:
    fx-9860g slim

Posted 09 February 2009 - 02:17 PM

Hi,

I'm using the casio SDK for the fx-9860g. It works, i have some programs up and running. Already i have hit some limitations.

Firstly, it looks like the "debug" build is the only option. does anyone know if an optimised build is possible with these tools. for example, from the command line. The tools look like the ones from Renesas, is this true? in which case, can the renesas ones be used instead and if so, are there any free/limited versions does anyone know. also is there a gcc toolchain alternative for superH?

I have run up to about 75k of code. the linker is giving me some jip about overflowing by B+R sections. seems limited to 8k. I'm thinking this is the initialised data area (correct?), so i'm wondering if such values can be forced into program space if they are constant. #pragma section global? is this the way?

Also, is there any special reason for this limitation of 8k, is it the tools or some architectural limit?

if you have any suggestions or pointers to information, that would be very helpful. thanks for your help,

-- hugh.

#2 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 09 February 2009 - 08:50 PM

The 8K is in the end limited by the OS. On my calc (OS v1.02), the memory segment allocated for the initialized data is 12k. Don't know where it is limited by the SDK tools.

About a GCC-setup, check http://fxsdk.sourcef...ka=BinaryFormat
In case you are on windows, - a pre-built GCC toolchain (called "GNUSH") for SH3 can be found at http://www.kpitgnutools.com/ (registration required)

If you define a variable/array to be constant with the const keyword, it should stay in the program section and not take space in RAM.

#3 Hugh

Hugh

    Newbie

  • Members
  • Pip
  • 9 posts
  • Location:London, uk

  • Calculators:
    fx-9860g slim

Posted 09 February 2009 - 10:05 PM

Thanks.

I'm going to have a go at making as much const as possible, also i'll give the KPIT stuff a go.

cheers,

-- hugh.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users