flat assembler
Message board for the users of flat assembler.

Index > Non-x86 architectures > STM32 and 44k of data org doesn't work!

Author
Thread Post new topic Reply to topic
deearhunter



Joined: 28 Apr 2016
Posts: 2
Location: Sweden
deearhunter 28 Apr 2016, 10:31
How do I circumvent the very bad way the org directive works in fasm(arm)? (For mee!)
I'm trying to put variables in flash but they just get appended at the end of the code not where they should be.
Any suggestions for a workaround?
Code:
 org 08004000h                  ; Start of Voice-list max 32k each voice 4k
  V_TAB:
  V_SINE:
  include 'sine-list.inc'
  V_TRIA:
  include 'triangle-list.inc'
  V_SQUARE:
  include 'square-list.inc'
  V_SAW:
  include 'sawtooth-list.inc'
  V_BURST:
  include 'burst-list.inc'
  V_GLOTT:
  include 'glottal-list.inc'
  V_NOISE:
  include 'noise-list.inc'
  V_PULSE:
  include 'pulse-list.inc'
 org 0800C000h                  ; Start of M-list 12k
  M_TAB:
  include 'M-list.inc'
 ;     
       

Not anything with relative adressing as I'd prefer to burn the tables only once.
I'm working with a 2.2 $ "bluepill" as a dual VCO with quad. outputs.
Post 28 Apr 2016, 10:31
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 28 Apr 2016, 11:20
Don't use org. It is not designed for your purpose. You can use "db":
Code:
org <somewhere>
;... <somewhere> data goes here
db (<newPlace> - $) dup 0xff ;create some padding
;<newPlace> data goes here    
Post 28 Apr 2016, 11:20
View user's profile Send private message Visit poster's website Reply with quote
deearhunter



Joined: 28 Apr 2016
Posts: 2
Location: Sweden
deearhunter 28 Apr 2016, 13:42
Thanks!
The $ sign means current location?
So I have to pad from about 3k (my program end) until the first 16k boundary if I want to have my tables start at that location.

I'll make an "empty program" that starts at the 16k boundary and burn it first hoping that the programmer doesn't erase that part of the chip.

I was hoping for some assembler directives like segment .table at 0x0....

It's kind of vexing, techniques that I've used for ages (since 78 ) doesn't work when migrating to a new platform.
Post 28 Apr 2016, 13:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 28 Apr 2016, 15:34
deearhunter wrote:
The $ sign means current location?
Yes.
Post 28 Apr 2016, 15:34
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.