flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > 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
STM32 and 44k of data org doesn't work!
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: 14494
Location: WTC Building 7
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
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: 14494
Location: WTC Building 7

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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.