If you must, you must. You should be aware that you've got to disable the driver ISR's or you'll end up with some strange results...
Also, the code you sent doesn't have a chance of working. Your options are to:
1. Use a "hosted" approach...i.e.: The fullblown HAL drivers and main() as your code entry point.
- In this mode the code flows from crt0.s to the Altera-provided alt_main(), and then into your user code.
2. Use a "freestanding" approach...i.e.: Using none of the HAL drivers and alt_main() as your entry point.
- In this mode the code flows from crt0.s directly into your alt_main.
- See the hello_led software example/template for a good example of this.
- Keep in mind, that, if you do this, you won't have any of the nice features the HAL provides.
Cheers,
- slacker