lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

If some common used functions being programed into a ROM.

Tue May 24, 2016 8:40 pm

And the user program would referenced those functions programmed into the ROM.
How does the linker hook up and referenced those functions in the ROM?
Anyone seen an example for that?

User avatar
PeterO
Posts: 5085
Joined: Sun Jul 22, 2012 4:14 pm

Re: If some common used functions being programed into a ROM

Tue May 24, 2016 8:45 pm

None of your questions are relevant to the PI. Find a micro controller forum and ask them there.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
PeterO
Posts: 5085
Joined: Sun Jul 22, 2012 4:14 pm

Re: If some common used functions being programed into a ROM

Wed May 25, 2016 6:40 am

There is nothing funny about my reply.

You are asking your questions on the wrong site. They seem to be related to micro-controllers and embedded systems development.
Find a forum dedicated to those and you'll stand a much better chance of getting the replies you are looking for.

Petero
Last edited by PeterO on Wed May 25, 2016 8:09 am, edited 1 time in total.
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: If some common used functions being programed into a ROM

Wed May 25, 2016 6:51 am

lilzz wrote:And the user program would referenced those functions programmed into the ROM.
How does the linker hook up and referenced those functions in the ROM?
A rom (?) like a usb stick and the PI? ... or do you mean an actual rom chip accessed by i2c or SPI?
marcus
:ugeek:

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: If some common used functions being programed into a ROM

Wed May 25, 2016 7:40 am

I've deleted some of the crud in this thread. Can we keep the light hearted banter to the off topic forum please.
Although I don't think we have established if the OP's question is off topic or not yet ;)
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
PeterO
Posts: 5085
Joined: Sun Jul 22, 2012 4:14 pm

Re: If some common used functions being programed into a ROM

Wed May 25, 2016 8:16 am

MarkHaysHarris777 wrote:
lilzz wrote:And the user program would referenced those functions programmed into the ROM.
How does the linker hook up and referenced those functions in the ROM?
A rom (?) like a usb stick and the PI? ... or do you mean an actual rom chip accessed by i2c or SPI?
No, she means a real ROM, not something accessed via a serial peripheral bus. If you don't know what a ROM is then you're not going to be able to help :roll:

As I said before the question is (almost certainly) concerned with developing code on microcontrollers for embedded systems where code has to be compiled to be placed at fixed,specific addresses in the memory map.
Compare that to the situation on a PI and you'll see why the question is unlikely to get answered here. Google will help as well :roll:

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: If some common used functions being programed into a ROM

Wed May 25, 2016 12:20 pm

PeterO wrote:
MarkHaysHarris777 wrote:
lilzz wrote:And the user program would referenced those functions programmed into the ROM.
How does the linker hook up and referenced those functions in the ROM?
A rom (?) like a usb stick and the PI? ... or do you mean an actual rom chip accessed by i2c or SPI?
No, she means a real ROM, not something accessed via a serial peripheral bus. If you don't know what a ROM is then you're not going to be able to help :roll:
Trying to find out what she means.

... by the way, a read only memory does not imply how its accessed (that's your paradigm) and has nothing to do with whether I know what a ROM is.

A real ROM can be accessed any number of ways... for your information a CD 'ROM' is also a read only memory... so is a DVD, so is an evil BlueRay disc... as is the ROM on every single i2c device (which is accessed serially).

:mrgreen:

PS We should probably wait until she responds ...
marcus
:ugeek:

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23932
Joined: Sat Jul 30, 2011 7:41 pm

Re: If some common used functions being programed into a ROM

Wed May 25, 2016 12:45 pm

lilzz wrote:And the user program would referenced those functions programmed into the ROM.
How does the linker hook up and referenced those functions in the ROM?
Anyone seen an example for that?
Are you using Linux? If so, you probably need to look up the mmap function and /dev/mem, which IIRC can translate physical addresses to the virtual addresses used in userland programs.

HOWEVER, how are you adding a ROM in the physical address space to the Pi? That's a (probably impossible) HW modification.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Return to “General programming discussion”