1
\$\begingroup\$

I was using MSP430G2553 with IAR Embedded workbench compiler which was working fine , then i recently installed Code composer studio and now the problem is when I run the same code

#include <msp430.h> 

void main(void)
{
   WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer

   P1DIR |= BIT0; // Set P1.0 to output and P1.3 to input direction
   P1OUT &= ~BIT0; // set P1.0 to Off
   P1IE |= BIT3; // P1.3 interrupt enabled
   P1IFG &= ~BIT3; // P1.3 interrupt flag cleared

   __bis_SR_register(GIE); // Enable all interrupts

   while(1) //Loop forever, we'll do our job in the interrupt routine...
   {}
}
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)   //ISR
{
    P1OUT ^= BIT0;  // Toggle P1.0
    P1IFG &= ~BIT3; // P1.3 interrupt flag cleared
}

with CCS it is giving me an error

MSP430: Trouble Writing Memory Block at 0xc000 on Page 0 of Length 0xba: This operation is not supported by this driver

I checked the target configuration and all seems to be set to correct setting but still i dont understand how am I accessing a wrong memory location

EDIT : Project's makefile

################################################################################

SHELL = cmd.exe

CG_TOOL_ROOT := C:/ti/ccsv5/tools/compiler/msp430_4.2.1

ORDERED_OBJS += \
$(GEN_CMDS__FLAG) \
"./main.obj" \
"../lnk_msp430g2553.cmd" \
-l"libc.a" \

-include ../makefile.init

RM := DEL /F
RMDIR := RMDIR /S/Q

# All of the sources participating in the build are defined here
-include sources.mk
-include subdir_vars.mk
-include subdir_rules.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(S_DEPS)),)
-include $(S_DEPS)
endif
ifneq ($(strip $(S_UPPER_DEPS)),)
-include $(S_UPPER_DEPS)
endif
ifneq ($(strip $(S62_DEPS)),)
-include $(S62_DEPS)
endif
ifneq ($(strip $(C64_DEPS)),)
-include $(C64_DEPS)
endif
ifneq ($(strip $(ASM_DEPS)),)
-include $(ASM_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(S55_DEPS)),)
-include $(S55_DEPS)
endif
ifneq ($(strip $(C67_DEPS)),)
-include $(C67_DEPS)
endif
ifneq ($(strip $(C??_DEPS)),)
-include $(C??_DEPS)
endif
ifneq ($(strip $(CLA_DEPS)),)
-include $(CLA_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(S??_DEPS)),)
-include $(S??_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(C62_DEPS)),)
-include $(C62_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(ASM_UPPER_DEPS)),)
-include $(ASM_UPPER_DEPS)
endif
ifneq ($(strip $(K_DEPS)),)
-include $(K_DEPS)
endif
ifneq ($(strip $(C43_DEPS)),)
-include $(C43_DEPS)
endif
ifneq ($(strip $(S67_DEPS)),)
-include $(S67_DEPS)
endif
ifneq ($(strip $(SA_DEPS)),)
-include $(SA_DEPS)
endif
ifneq ($(strip $(S43_DEPS)),)
-include $(S43_DEPS)
endif
ifneq ($(strip $(OPT_DEPS)),)
-include $(OPT_DEPS)
endif
ifneq ($(strip $(S64_DEPS)),)
-include $(S64_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(C55_DEPS)),)
-include $(C55_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables 

# All Target
all: BlinkLED.out

# Tool invocations
BlinkLED.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
    @echo 'Building target: $@'
    @echo 'Invoking: MSP430 Linker'
    "C:/ti/ccsv5/tools/compiler/msp430_4.2.1/bin/cl430" -vmsp --abi=eabi --advice:power="all" -g --define=__MSP430G2553__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal -z -m"BlinkLED.map" --heap_size=80 --stack_size=80 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.1/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.1/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="BlinkLED_linkInfo.xml" --rom_model -o "BlinkLED.out" $(ORDERED_OBJS)
    @echo 'Finished building target: $@'
    @echo ' '

# Other Targets
clean:
    -$(RM) $(MSP430_EXECUTABLE_OUTPUTS__QUOTED) "BlinkLED.out"
    -$(RM) "main.pp" 
    -$(RM) "main.obj" 
    -@echo 'Finished clean'
    -@echo ' '

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets
\$\endgroup\$
6
  • \$\begingroup\$ Which exactly toolchain are you using (CCS is just an IDE)?. Also which tool for firmware flashing are you using? Which board do you have (is it Launchpad)? Also show us your Makefile where building and flashing take place. \$\endgroup\$
    – Sam Protsenko
    Commented Apr 4, 2015 at 12:41
  • \$\begingroup\$ Code Composer Studio 5.5.0 , yes its an IDE , yes it is a launchpad i actually have two micro controllers for the launchpad the other on is g2452 but i am using g2553 on the launchpad \$\endgroup\$
    – johnny
    Commented Apr 4, 2015 at 14:32
  • \$\begingroup\$ I actually cannot find any *.mk file in my prject directory \$\endgroup\$
    – johnny
    Commented Apr 4, 2015 at 14:36
  • \$\begingroup\$ You should look for file called Makefile. When you run make tool without arguments, it looks exactly for that file (starting from upper-cased M). Thats why you can often find that IDEs use this file. \$\endgroup\$
    – Sam Protsenko
    Commented Apr 4, 2015 at 14:38
  • \$\begingroup\$ I have added that now \$\endgroup\$
    – johnny
    Commented Apr 4, 2015 at 14:46

1 Answer 1

1
\$\begingroup\$

Note that the error message says nothing about writing to the wrong location. It does, however, mention the length of what is being written, so you might want to check whether that is an allowed length for your new toolchain. Some compilers limit the lengths you can write to multiples of a certain value.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.