Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Solra Bizna

[MC1.7.10][OC1.5.x]ARM Architecture "OC-ARM" (alpha, updated 2016-06-07)

Recommended Posts

Ok, After some digging i finally found where binutils installed to. it installed into Xcode.app all the way in the back of the program it took some looking but i found it so now i need to replace arm-none-eabi with its path, the only thing thats got me now is that there is no onjcopy or obj dump- that i can see though. the directory that i found the file is was /Applicatoins/Xcode.app/Contents?Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin i don tthink i have the wrong directory because it has LD and AS in it, do you want me to post a screen shot? I FEEL WE ARE GETTING REALLY CLOSE

That's probably the ld, as, etc. that came with XCode. Not the ones you just built. 

 

HOLD THE PHONE!

ok, after some checking i found out that binutils did not successfully install onto my mac, surprise! (just my luck). i have no remote clue why. same thing i did on my mac i did to my linux and it worked out just fine. i have attempted to install binutils version 2.26 there are a few errors but it still went on so i ignored them.thte only error i was it complaining because sbrk was deprecated.

If that's an error, and not a warning, then it will completely prevent the build/install from finishing. The errors with newlib didn't stop it from working because you passed the "-k" option to make, which says "make as much as you can in spite of errors"; this works for newlib because the errored part isn't needed for OC-ARM, but won't work for binutils.

 

the spiel of information that clang gives me when i ask it for a version is

Apple LLVM version 7.3.0 (clang-703-0-29)

Target: X86_64-apple-darwin15.4.0

Thread model: poix

Installed Directory: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchains/usr/bin

 

this version of clang came with Xcode. should i upgrade it. its late over here and my brain has stopped working.

That should be recent enough. But it's clang's built-in assembler that's rejecting my inline assembly.

 

Looking closer at your error, it's acting like it's trying to compile the assembly as x86 assembly, which is wrong. It shouldn't be doing that...

 

it might be worth it for me to try your work around up top can you explain a little bit more. i think i am mis-understanding by overthinking what your asking me to do up there

How does one do this ^^^^

 

i am going to take a small break when we get this part working, it has confused me and blown my fuses up top. but hey it'll be worth it because then i can apply what i learn in this mod (almost) directly to one of my projects i have been trying to do (i had NO clue that in order to right a program for arm it would require this. this is going to end up being more then my hobby.)

That's the stuff about AS=... I talked about before.

I'd really recommend doing this on your Linux machine for now, to minimize the effects of Apple's weird toolchain.

Also, taking a break when fuses are blown frequently helps.

Edit: Now editing the first post as needed to stay up to date. Info about a2 and the current status of a3 is up there.

Link to post
Share on other sites

ok, thanks.

Edit: Remember that error where i asked if it was syntax? thats what happens when i try to compile on my linux as well.

yes i noticed this morning that the target for my clan got my mac would change. i don't know why this is and its kinda confusing me

Link to post
Share on other sites

Alrighty. its 3:30 where i am thats AM. but i think i might be able to get it to work on my linux like you suggested with out running make install i was able to find the files and i am here now to copy and paste the changes to the make file from page 3 hope this works

 

 

this is on my linux btw

 

 

alright 4AM now. gonna sleep but figured i would update you. ON LINUX NO MAC WHAT SO EVER. 

running Clang 3.8.0-2ubuntu3

 

the same error in the spoiler up there is what i am getting on my linux after i point the make file for jarmrom (the one in 0.0a1) towards the tools (gas,ld,obj(dump,copy)) i still have no clue but maybe sleep will help. if your on the other side then good afternoon if your on this side then good morning

Link to post
Share on other sites

i think i found the problem. i think i mis-edited (new word) i will link the the make file before i did the instructions in the last message when i am on my linux. this is the same way my mac is setup

 

 

AS=/home/james/Desktop/jarmrom_mods/binutils-2.26/gas/as-new
CC=clang
CXX=clang++
LD=/home/james/Desktop/jarmrom_mods/binutils-2.26/ld/ld-new
OBJCOPY=/home/james/Desktop/jarmrom_mods/binutils-2.26/binutils/objcopy

OBJDUMP=/home/james/Desktop/jarmrom_mods/binutils-2.26/binutils/objdump

ASFLAGS=-march=armv7-a -mfloat-abi=soft -EB -mthumb-interwork
CFLAGS=-Oz -g -Iinclude/ -nostdlibinc -isystem include/ -isystem ../newlib-jarm-build/ -isystem ../newlib-2.4.0/newlib/libc/include/

CXXFLAGS=$(CFLAGS)
LDFLAGS=--be8 -z max-page-size=4

all: bin/test.elf bin/boot0.rom bin/tetris.rom bin/redclock.rom

bin/%.rom: bin/%.elf
	@echo "Preloading to $@..."
	@$(OBJCOPY) $< -Sg -O binary $@~
	@echo -n "--[==[" > $@
	@cat $@~ >> $@
	@rm -f $@~
	@echo -n "]==]error\"This EEPROM is not compatible with Lua computers\"" >> $@
	@(test `wc -c $@ | cut -f 1 -d " "` -gt 4096 && echo "WARNING: Image is larger than 4KiB" >&2) || true

bin/%.elf: src/%.ld obj/%.o
	@echo "Linking $@..."
	@$(LD) $(LDFLAGS) -T $^ -o $@
	@($(OBJDUMP) -d $@ > bin/$*.txt) || true

bin/test.elf: src/test.ld obj/test.o obj/startup.o

bin/boot1.elf: src/boot1.ld obj/boot1.o obj/boot1_startup.o obj/boot1_devsetup.o obj/boot1_ccutil.o obj/nvram.o obj/debug.o obj/boot1_autoboot_prompt.o obj/boot1_out_line.o obj/boot1_ramstack.o obj/u2a.o obj/boot1_key_was_pressed.o

bin/boot0.elf: src/boot0.ld obj/boot0.o obj/boot0_ccutil.o

bin/tetris.elf: src/tetris.ld obj/tetris.o obj/tetris_startup.o obj/tetrominoes.o obj/tetris_util.o obj/tetris_ccutil.o obj/tetris_ui.o obj/tetris_rand.o

bin/redclock.elf: src/redclock.ld obj/redclock.o obj/startup.o

obj/%.o: src/%.c
	@echo "Compiling $<..."
	@$(CC) $(CFLAGS) -c "$<" -o "$@"

obj/%.o: src/%.cc
	@echo "Compiling $<..."
	@$(CXX) $(CXXFLAGS) -c "$<" -o "$@"

obj/%.o: src/%.s
	@echo "Assembling $<..."
	@$(AS) $(ASFLAGS) -o $@ $<

clean:
	rm -f obj/* bin/*

.PRECIOUS: obj/%.o bin/%.elf

 

its a large file but i think its ok to not post with out pastebin, if you would prefer i could sen dit over google drive instead

 

 

just out of curiosity is there anyway on could make a tool inside OC that could do this. (i mean easily) or would it be best to make some sort of online tool that oc can access and upload files to?

Link to post
Share on other sites

HAHAHA i have done it i was able to install binutils on my mac (for future refrence i am running Ei Captain)

./configure --target=arm-linux --disable-werror

it takes a good long while and it make my air get up to heat but it worked, the problem is because sbrk is disabled/ deprecated in the mac version of clang. THIS DOES WORK atleast to the point of compiling binutils i havent tried it with your mod and newlib yet but for future mac users on this forum this is how it works (for now).

 

 

tested on your program. at the same spot as the linux. i think it might be a mis communication for when i was editing the make file for jarmrom thats why i posted it in the chat section. if you could please review that and tell me if all is in order

Link to post
Share on other sites

Yes, you mis-edited the Makefile. When you edited the CFLAGS to build against newlib, you removed some other important options.

As for getting binutils on your Mac... it makes sense that --disable-werror would fix it. If I'd known about that option, I might've suggested it. You should be able to get it building on your Mac now.

Link to post
Share on other sites

On the CFLAGS line, where it says:

-Iinclude/
change it to say:

-nostdlibinc -isystem include/ -isystem ../newlib-jarm-build/ -isystem ../newlib-2.4.0/newlib/libc/include/
That was intended to replace, specifically, the "-Iinclude/" part of the line, and not the entire line.
Link to post
Share on other sites

YES it worked. however it errored later on i believe this error to be far less. it failed during linking but IT WORKED. here is the correct error. its complaining about EABI. i figured i would post the error here then start trying to figure out why. 

make
Linking bin/test.elf...
/Users/rougeminner/Desktop/Hobby_Projects/Jarm_Projects/binutils-2.26/ld/ld-new: error: Source object obj/startup.o has EABI version 0, but target bin/test.elf has EABI version 5
/Users/rougeminner/Desktop/Hobby_Projects/Jarm_Projects/binutils-2.26/ld/ld-new: failed to merge target specific data of file obj/startup.o
make: *** [bin/test.elf] Error 1

Link to post
Share on other sites

YEAS, YEAH SWEET BABY BACK RIBS IT WORKED :P, i will upload paste the file here. it worked. wow. is this what success feels like and better yet it worked on mac Ei captain

 

AS=/Users/[YOUR USERNAME]/Desktop/Hobby_Projects/Jarm_Projects/binutils-2.26/gas/as-new 
CC=clang
CXX=clang++
LD=/Users/[YOUR USERNAME]/Desktop/Hobby_Projects/Jarm_Projects/binutils-2.26/ld/ld-new 
OBJCOPY=/Users/[YOUR USERNAME]/Desktop/Hobby_Projects/Jarm_Projects/binutils-2.26/binutils/objcopy 

OBJDUMP=/Users/[YOUR NAME]/Desktop/Hobby_Projects/Jarm_Projects/binutils-2.26/binutils/objdump 


ASFLAGS=-march=armv7-a -mfloat-abi=soft -EB -mthumb-interwork -meabi=5
CFLAGS=-Oz -g -nostdlibinc -isystem include/ -isystem ../newlib-jarm-build/ -isystem ../newlib-2.4.0/newlib/libc/include/ -ffreestanding -mhwdiv=arm,thumb -target armv7a-eabi -mbig-endian -mfloat-abi=soft -msoft-float -Wall -Werror -mllvm -inline-threshold=-20
CXXFLAGS=$(CFLAGS)
LDFLAGS=--be8 -z max-page-size=4

all: bin/test.elf bin/boot0.rom bin/tetris.rom bin/redclock.rom

bin/%.rom: bin/%.elf
	@echo "Preloading to $@..."
	@$(OBJCOPY) $< -Sg -O binary $@~
	@echo -n "--[==[" > $@
	@cat $@~ >> $@
	@rm -f $@~
	@echo -n "]==]error\"This EEPROM is not compatible with Lua computers\"" >> $@
	@(test `wc -c $@ | cut -f 1 -d " "` -gt 4096 && echo "WARNING: Image is larger than 4KiB" >&2) || true

bin/%.elf: src/%.ld obj/%.o
	@echo "Linking $@..."
	@$(LD) $(LDFLAGS) -T $^ -o $@
	@($(OBJDUMP) -d $@ > bin/$*.txt) || true

bin/test.elf: src/test.ld obj/test.o obj/startup.o

bin/boot1.elf: src/boot1.ld obj/boot1.o obj/boot1_startup.o obj/boot1_devsetup.o obj/boot1_ccutil.o obj/nvram.o obj/debug.o obj/boot1_autoboot_prompt.o obj/boot1_out_line.o obj/boot1_ramstack.o obj/u2a.o obj/boot1_key_was_pressed.o

bin/boot0.elf: src/boot0.ld obj/boot0.o obj/boot0_ccutil.o

bin/tetris.elf: src/tetris.ld obj/tetris.o obj/tetris_startup.o obj/tetrominoes.o obj/tetris_util.o obj/tetris_ccutil.o obj/tetris_ui.o obj/tetris_rand.o

bin/redclock.elf: src/redclock.ld obj/redclock.o obj/startup.o

obj/%.o: src/%.c
	@echo "Compiling $<..."
	@$(CC) $(CFLAGS) -c "$<" -o "$@"

obj/%.o: src/%.cc
	@echo "Compiling $<..."
	@$(CXX) $(CXXFLAGS) -c "$<" -o "$@"

obj/%.o: src/%.s
	@echo "Assembling $<..."
	@$(AS) $(ASFLAGS) -o $@ $<

clean:
	rm -f obj/* bin/*

.PRECIOUS: obj/%.o bin/%.elf
 
Link to post
Share on other sites

alright now for a fun question. any suggestions for a website i can upload to so that i can download them on my friends server? google drive didn't work on the OC side of things haven't tried dropbox yet, also i am so glad that it was just something small that i did that was causing the problem with the compiler although i do apologize for it. IT WORKED! still to happy about getting a compiler working(wonder what hello,world! well be if i am this happy :D)

 

how are the FPU's coming?

Link to post
Share on other sites

i am stuck now. i know i have the means to do something with it, but i don't know what that something is now. i don't know what to do. spent so much time trying to figure out how to get it working but not once thought about after that... my foresight is not 20/20

 

 

yeah. i make crashes frequently. i think i might be using the wrong code. the old ones let me change this around a little bit

 

 

EDIT: any ideas or should i wait for 0.0a3?

0.0a2 um. i don't really know what happening its kinda funny. i can find a detailed report of whats happening. when i try to launch test.elf from boot0.rom all tile entities and regular entities completely stop (except the character) at one point i got a cpu.execute error but i don't think this we related. any ideas? (this happened just after i told my friend that there was no way this mod would screw up the world. maybe i jinxed it and its just my fault :D)

 

also i figured i should mention it only happens when i turn a (what i think is errored computer) off and back on.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.