Mega 2560 initializing UART over USB from scratch

I'm trying to move over some C code that I had developed on an Arduino uno to a Mega (not the IDE thing, actual C code with a custom Makefile) and I'm having trouble getting the hardware serial working correctly.

Here is my init function:

void initialize_uart(unsigned int ubrr_value) {
/*

  • Set Baud rate
    */
    UBRR0H = (unsigned char)(ubrr_value >> 0x08 );
    UBRR0L = (unsigned char)(ubrr_value);

/*

  • Frame Format: asynchronous, no parity, 1 stop bit, char size 8
    */
    UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);

/*

  • Enable The receiver and transmitter
    */
    UCSR0B = (1 << RXEN0) | (1 << TXEN0);

}

And then data is sent by reading and writing to UDR0 with the appropriate stalling loops.

I'm trying to print to the USB terminal and I am unable to get anything out. I can see the bytes being received by the board as the RX LED will flicker when I send a char, but the TX will not respond as it's supposed to.

I can get the device to loopback correctly when I use the IDE code, so I suspect that I am missing something subtle between the Uno and the Mega.

I understand that the Mega no longer uses an FTDI chip to handle USB translation, could this be the cause of this issue?

Any help with initializing the USB UART on the Mega in C code would be very appreciated. Thank you.