Null Pointer Exception when trying to compile with external DRAM defined in memory configuration editor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Null Pointer Exception when trying to compile with external DRAM defined in memory configuration editor

346 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dwjperry on Tue Nov 26 17:21:42 MST 2013
I'm trying to put some data in the external DRAM on my Embedded Artists LPC4357 dev board. I can read and write to the DRAM directly, but when I try and define the memory in the Memory Configuration Editor (starting address 0x28000000, size of 0x2000000, alias of RAM6) I get the following exception during compilation:


Quote:
java.lang.NullPointerException
  at com.crt.advproject.linker.CreateLinkerScript2.addMemoryProperties(Unknown Source)
  at com.crt.advproject.linker.CreateLinkerScript2.buildLinkerMacros(Unknown Source)
  at com.crt.advproject.linker.CreateLinkerScript2.create(Unknown Source)
  at com.crt.advproject.linker.CreateLinkerScript2.buildScripts(Unknown Source)
  at com.crt.advproject.custom.CRTGnuMakefileGenerator.regenerateMakefiles(Unknown Source)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performMakefileGeneration(CommonBuilder.java:1006)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performPrebuildGeneration(CommonBuilder.java:873)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:748)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:513)
  at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:459)
  at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
  at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
  at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:394)
  at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
  at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
  at org.eclipse.core.internal.resources.Project.build(Project.java:114)
  at com.crt.ctrlcenter.launch.BuildUtils.buildProjects(Unknown Source)
  at com.crt.ctrlcenter.launch.BuildUtils.access$0(Unknown Source)
  at com.crt.ctrlcenter.launch.BuildUtils$2.run(Unknown Source)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)



The compilation still succeeds, but when I run the code, the variables I try to place in RAM6 (using the prefix __BSS(RAM6) ) don't end up there, and are placed on the built-in RAM instead.

I'm running LPCxpresso 6.0.4. Is this a bug, or have I done something wrong? A workaround for the moment is to directly write data to the DRAM addresses, but it would be nicer if I could let the compiler handle it.
0 Kudos
5 Replies

333 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Dec 17 15:38:22 MST 2013
Which version of LPCXpresso are you using? I am pretty certain this bug was fixed in v6.1.0 - and we are currently shipping 6.1.2.

Please install the latest version and try again.
0 Kudos

333 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dwjperry on Tue Dec 17 15:12:13 MST 2013
Oh, sorry, you're quite right. Was worried about including the names of some of our internal libraries, but haven't added them yet anyway.

(I've added the .c extension to allow it to be uploaded.)

0 Kudos

333 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Dec 17 01:34:25 MST 2013
Attach it here. There is none of your IP in the .cproject file
0 Kudos

333 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dwjperry on Mon Dec 16 15:58:46 MST 2013
Okay, where do I send the .cproject file to? I can't find a bug report / support email or form...

I'd rather not attach it here as it might give away some IP...
0 Kudos

333 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Nov 27 01:23:35 MST 2013
Any Null Pointer Exception is a bug...

Can you please send your .cproject file (located in the root of the project) so we can investigate.

To recover, I suggest you recreate your memory configuration:
- open the Properties for the project
- select the MCU Settings page
- reset the existing memory by selecting another MCU and then reselecting the LPC4357
- add your memory configuration again

HTH
0 Kudos