stryd_one Posted July 28, 2008 Report Share Posted July 28, 2008 Hey boxers!Quick tip for you, regarding the new unified mios platform, and custom linker scripts....You can specify your own linker script, like many things, in the makefile. Chances are, you'll put the linker script in the same directory as the main.c, right... So you copy your makefile from '\trunk\etc\lkr', into your app's root dir, and you make your mods... Then you edit the makefile.The original: # define the processor, linker file and project name PROCESSOR = 18f452 LKR_FILE = $(MIOS_PATH)/etc/lkr/p$(PROCESSOR).lkr PROJECT = project The mod: # define the processor, linker file and project name PROCESSOR = 18f452 # Custom linker LKR_FILE = ./$(PROCESSOR).lkr PROJECT = project Now, you're probably thinking like "Duh" right about now. But there's one important thing to note there, and it's pretty subtle.This:LKR_FILE = $(PROCESSOR).lkrWill compile. No worries. But it won't work with the dist script. You need this:LKR_FILE = ./$(PROCESSOR).lkrthe dot-slash is required. That's all, enjoy! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.