Okay, got it to work!
When the bsp was generated, it linked the sdram region to the available memory regions.
The linker was also set to sdram_controller_0
Setting all the linker region to the onchip memory, was not enought, I had to delete the region from the "Linker Memory Regions".
This made that the compiled code took 20k less memory. The sdram is still available throught the avalon bus as expected.
So finally, problem solved :)